-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.gitlab-ci.yml
139 lines (129 loc) · 4.52 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
image: "rustlang/rust:nightly"
stages:
- build
- test
build:
stage: build
script:
- git submodule update --init --recursive
- (cd bentofs && make)
- (cd hello_ll/rust && make all)
- (cd xv6fs/rust && make all)
- (cd hello_srv/rust && make)
- (cd hello_client/rust && make all)
test_hello:
stage: test
script:
- git submodule update --init --recursive
- (cd bentofs && make)
- (cd hello_ll/rust && make)
- sudo insmod bentofs/bentofs.ko
- sudo insmod hello_ll/rust/kernel/hello_ll.ko
- sudo mkdir -p /mnt/hello
- sudo mount -t bentoblk -o fd=10,rootmode=40000,user_id=0,group_id=0,blksize=4096,name=hello_ll -o loop hello_ll/hello /mnt/hello
- sudo cat /mnt/hello/hello
- sudo umount /mnt/hello
- sudo rmmod hello_ll
- sudo rmmod bentofs
test_user_hello:
stage: test
script:
- git submodule update --init --recursive
- (cd hello_ll/rust && make userspace)
- sudo mkdir -p /mnt/hello
- sudo hello_ll/rust/userspace/target/release/user_hello hello_ll/hello /mnt/hello &
- sleep 1
- sudo cat /mnt/hello/hello
- sudo fusermount -u /mnt/hello
test_xv6fs:
stage: test
script:
- git submodule update --init --recursive
- (cd bentofs && make)
- (cd xv6fs/rust && make)
- (cd xv6fs/mkfs && gcc mkfs.c && ./a.out fs.img)
- sudo insmod bentofs/bentofs.ko
- sudo insmod xv6fs/rust/kernel/xv6fs.ko
- sudo mkdir -p /mnt/xv6fs
- sudo mount -t bentoblk -o fd=10,rootmode=40000,user_id=0,group_id=0,blksize=4096,name=xv6fs_ll -o loop xv6fs/mkfs/fs.img /mnt/xv6fs
- echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
- sudo filebench -f /home/test/fileserver.f
- sudo umount /mnt/xv6fs
- sudo rmmod xv6fs
- sudo rmmod bentofs
test_user_xv6fs:
stage: test
script:
- git submodule update --init --recursive
- (cd xv6fs/rust && make userspace)
- (cd xv6fs/mkfs && gcc mkfs.c && ./a.out fs.img)
- sudo mkdir -p /mnt/xv6fs
- sudo xv6fs/rust/userspace/target/release/user_xv6fs xv6fs/mkfs/fs.img /mnt/xv6fs &
- sleep 1
- echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
- sudo filebench -f /home/test/fileserver.f
- sudo fusermount -u /mnt/xv6fs
test_hello_tcp:
stage: test
script:
- git submodule update --init --recursive
- (cd bentofs && make)
- (cd hello_srv/rust && make)
- (cd hello_client/rust && make)
- sudo insmod bentofs/bentofs.ko
- sudo hello_srv/rust/target/release/hello_srv hello_ll/hello &
- sleep 1
- sudo insmod hello_client/rust/kernel/hello_client.ko
- sudo mkdir -p /mnt/hello
- sudo mount -t bento -o fd=10,rootmode=40000,user_id=0,group_id=0,name=hello_client hello_ll/hello /mnt/hello
- sudo cat /mnt/hello/hello
- sudo umount /mnt/hello
- sudo rmmod hello_client
- sudo rmmod bentofs
test_user_hello_tcp:
stage: test
script:
- git submodule update --init --recursive
- (cd hello_srv/rust && make)
- (cd hello_client/rust && make userspace)
- sudo mkdir -p /mnt/hello
- sudo hello_srv/rust/target/release/hello_srv hello_ll/hello &
- sleep 1
- sudo hello_client/rust/userspace/target/release/hello_client /mnt/hello &
- sleep 1
- sudo cat /mnt/hello/hello
- sudo fusermount -u /mnt/hello
test_update_hello:
stage: test
script:
- git submodule update --init --recursive
- (cd bentofs && make)
- (cd hello_ll/rust && make)
- (cd hello_ll2/rust && make)
- sudo insmod bentofs/bentofs.ko
- sudo insmod hello_ll/rust/kernel/hello_ll.ko
- sudo mkdir -p /mnt/hello
- sudo mount -t bentoblk -o fd=10,rootmode=40000,user_id=0,group_id=0,blksize=4096,name=hello_ll -o loop hello_ll/hello /mnt/hello
- sudo cat /mnt/hello/hello
- sudo insmod hello_ll2/rust/kernel/hello_ll2.ko
- sudo rmmod hello_ll
- sudo cat /mnt/hello/hello2
- sudo umount /mnt/hello
- sudo rmmod hello_ll2
- sudo rmmod bentofs
test_prov:
stage: test
script:
- git submodule update --init --recursive
- (cd bentofs && make)
- (cd xv6fs_prov/rust && make)
- (cd xv6fs/mkfs && gcc mkfs.c && ./a.out fs.img)
- sudo insmod bentofs/bentofs.ko
- sudo insmod xv6fs_prov/rust/kernel/xv6fs_prov.ko
- sudo mkdir -p /mnt/xv6fs
- sudo mount -t bentoblk -o fd=10,rootmode=40000,user_id=0,group_id=0,blksize=4096,name=xv6fs_ll -o loop xv6fs/mkfs/fs.img /mnt/xv6fs
- echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
- sudo filebench -f /home/test/fileserver.f
- sudo umount /mnt/xv6fs
- sudo rmmod xv6fs_prov
- sudo rmmod bentofs