diff options
Diffstat (limited to 'test/compile/compile.sh')
-rwxr-xr-x | test/compile/compile.sh | 95 |
1 files changed, 47 insertions, 48 deletions
diff --git a/test/compile/compile.sh b/test/compile/compile.sh index 6b994ba70..0285c8935 100755 --- a/test/compile/compile.sh +++ b/test/compile/compile.sh | |||
@@ -31,7 +31,7 @@ arr[15]="TEST 15: compile private-home disabled" | |||
31 | arr[16]="TEST 16: compile disable manpages" | 31 | arr[16]="TEST 16: compile disable manpages" |
32 | arr[17]="TEST 17: disable tmpfs as regular user" | 32 | arr[17]="TEST 17: disable tmpfs as regular user" |
33 | arr[18]="TEST 18: disable private home" | 33 | arr[18]="TEST 18: disable private home" |
34 | arr[18]="TEST 19: enable ids" | 34 | arr[19]="TEST 19: enable ids" |
35 | 35 | ||
36 | # remove previous reports and output file | 36 | # remove previous reports and output file |
37 | cleanup() { | 37 | cleanup() { |
@@ -47,23 +47,23 @@ print_title() { | |||
47 | echo | 47 | echo |
48 | echo | 48 | echo |
49 | echo "**************************************************" | 49 | echo "**************************************************" |
50 | echo $1 | 50 | echo "$1" |
51 | echo "**************************************************" | 51 | echo "**************************************************" |
52 | } | 52 | } |
53 | 53 | ||
54 | DIST="$1" | 54 | DIST="$1" |
55 | while [ $# -gt 0 ]; do # Until you run out of parameters . . . | 55 | while [[ $# -gt 0 ]]; do # Until you run out of parameters . . . |
56 | case "$1" in | 56 | case "$1" in |
57 | --clean) | 57 | --clean) |
58 | cleanup | 58 | cleanup |
59 | exit | 59 | exit |
60 | ;; | 60 | ;; |
61 | --help) | 61 | --help) |
62 | echo "./compile.sh [--clean|--help]" | 62 | echo "./compile.sh [--clean|--help]" |
63 | exit | 63 | exit |
64 | ;; | 64 | ;; |
65 | esac | 65 | esac |
66 | shift # Check next set of parameters. | 66 | shift # Check next set of parameters. |
67 | done | 67 | done |
68 | 68 | ||
69 | cleanup | 69 | cleanup |
@@ -76,8 +76,8 @@ cleanup | |||
76 | #***************************************************************** | 76 | #***************************************************************** |
77 | print_title "${arr[1]}" | 77 | print_title "${arr[1]}" |
78 | echo "$DIST" | 78 | echo "$DIST" |
79 | tar -xJvf ../../$DIST.tar.xz | 79 | tar -xJvf ../../"$DIST.tar.xz" |
80 | mv $DIST firejail | 80 | mv "$DIST" firejail |
81 | 81 | ||
82 | cd firejail | 82 | cd firejail |
83 | ./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure | 83 | ./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure |
@@ -89,7 +89,6 @@ cp output-configure oc1 | |||
89 | cp output-make om1 | 89 | cp output-make om1 |
90 | rm output-configure output-make | 90 | rm output-configure output-make |
91 | 91 | ||
92 | |||
93 | #***************************************************************** | 92 | #***************************************************************** |
94 | # TEST 2 | 93 | # TEST 2 |
95 | #***************************************************************** | 94 | #***************************************************************** |
@@ -98,7 +97,7 @@ rm output-configure output-make | |||
98 | print_title "${arr[2]}" | 97 | print_title "${arr[2]}" |
99 | cd firejail | 98 | cd firejail |
100 | make distclean | 99 | make distclean |
101 | ./configure --prefix=/usr --disable-dbusproxy --enable-fatal-warnings 2>&1 | tee ../output-configure | 100 | ./configure --prefix=/usr --disable-dbusproxy --enable-fatal-warnings 2>&1 | tee ../output-configure |
102 | make -j4 2>&1 | tee ../output-make | 101 | make -j4 2>&1 | tee ../output-make |
103 | cd .. | 102 | cd .. |
104 | grep Warning output-configure output-make > ./report-test2 | 103 | grep Warning output-configure output-make > ./report-test2 |
@@ -115,7 +114,7 @@ rm output-configure output-make | |||
115 | print_title "${arr[3]}" | 114 | print_title "${arr[3]}" |
116 | cd firejail | 115 | cd firejail |
117 | make distclean | 116 | make distclean |
118 | ./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure | 117 | ./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure |
119 | make -j4 2>&1 | tee ../output-make | 118 | make -j4 2>&1 | tee ../output-make |
120 | cd .. | 119 | cd .. |
121 | grep Warning output-configure output-make > ./report-test3 | 120 | grep Warning output-configure output-make > ./report-test3 |
@@ -132,7 +131,7 @@ rm output-configure output-make | |||
132 | print_title "${arr[4]}" | 131 | print_title "${arr[4]}" |
133 | cd firejail | 132 | cd firejail |
134 | make distclean | 133 | make distclean |
135 | ./configure --prefix=/usr --disable-firetunnel --enable-fatal-warnings 2>&1 | tee ../output-configure | 134 | ./configure --prefix=/usr --disable-firetunnel --enable-fatal-warnings 2>&1 | tee ../output-configure |
136 | make -j4 2>&1 | tee ../output-make | 135 | make -j4 2>&1 | tee ../output-make |
137 | cd .. | 136 | cd .. |
138 | grep Warning output-configure output-make > ./report-test4 | 137 | grep Warning output-configure output-make > ./report-test4 |
@@ -149,7 +148,7 @@ rm output-configure output-make | |||
149 | print_title "${arr[5]}" | 148 | print_title "${arr[5]}" |
150 | cd firejail | 149 | cd firejail |
151 | make distclean | 150 | make distclean |
152 | ./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure | 151 | ./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure |
153 | make -j4 2>&1 | tee ../output-make | 152 | make -j4 2>&1 | tee ../output-make |
154 | cd .. | 153 | cd .. |
155 | grep Warning output-configure output-make > ./report-test5 | 154 | grep Warning output-configure output-make > ./report-test5 |
@@ -167,7 +166,7 @@ rm output-configure output-make | |||
167 | print_title "${arr[6]}" | 166 | print_title "${arr[6]}" |
168 | cd firejail | 167 | cd firejail |
169 | make distclean | 168 | make distclean |
170 | ./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure | 169 | ./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure |
171 | make -j4 2>&1 | tee ../output-make | 170 | make -j4 2>&1 | tee ../output-make |
172 | cd .. | 171 | cd .. |
173 | grep Warning output-configure output-make > ./report-test6 | 172 | grep Warning output-configure output-make > ./report-test6 |
@@ -184,7 +183,7 @@ rm output-configure output-make | |||
184 | print_title "${arr[7]}" | 183 | print_title "${arr[7]}" |
185 | cd firejail | 184 | cd firejail |
186 | make distclean | 185 | make distclean |
187 | ./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure | 186 | ./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure |
188 | make -j4 2>&1 | tee ../output-make | 187 | make -j4 2>&1 | tee ../output-make |
189 | cd .. | 188 | cd .. |
190 | grep Warning output-configure output-make > ./report-test7 | 189 | grep Warning output-configure output-make > ./report-test7 |
@@ -218,7 +217,7 @@ rm output-configure output-make | |||
218 | print_title "${arr[9]}" | 217 | print_title "${arr[9]}" |
219 | cd firejail | 218 | cd firejail |
220 | make distclean | 219 | make distclean |
221 | ./configure --prefix=/usr --disable-file-transfer --enable-fatal-warnings 2>&1 | tee ../output-configure | 220 | ./configure --prefix=/usr --disable-file-transfer --enable-fatal-warnings 2>&1 | tee ../output-configure |
222 | make -j4 2>&1 | tee ../output-make | 221 | make -j4 2>&1 | tee ../output-make |
223 | cd .. | 222 | cd .. |
224 | grep Warning output-configure output-make > ./report-test9 | 223 | grep Warning output-configure output-make > ./report-test9 |
@@ -235,7 +234,7 @@ rm output-configure output-make | |||
235 | print_title "${arr[10]}" | 234 | print_title "${arr[10]}" |
236 | cd firejail | 235 | cd firejail |
237 | make distclean | 236 | make distclean |
238 | ./configure --prefix=/usr --disable-whitelist --enable-fatal-warnings 2>&1 | tee ../output-configure | 237 | ./configure --prefix=/usr --disable-whitelist --enable-fatal-warnings 2>&1 | tee ../output-configure |
239 | make -j4 2>&1 | tee ../output-make | 238 | make -j4 2>&1 | tee ../output-make |
240 | cd .. | 239 | cd .. |
241 | grep Warning output-configure output-make > ./report-test10 | 240 | grep Warning output-configure output-make > ./report-test10 |
@@ -252,7 +251,7 @@ rm output-configure output-make | |||
252 | print_title "${arr[11]}" | 251 | print_title "${arr[11]}" |
253 | cd firejail | 252 | cd firejail |
254 | make distclean | 253 | make distclean |
255 | ./configure --prefix=/usr --disable-globalcfg --enable-fatal-warnings 2>&1 | tee ../output-configure | 254 | ./configure --prefix=/usr --disable-globalcfg --enable-fatal-warnings 2>&1 | tee ../output-configure |
256 | make -j4 2>&1 | tee ../output-make | 255 | make -j4 2>&1 | tee ../output-make |
257 | cd .. | 256 | cd .. |
258 | grep Warning output-configure output-make > ./report-test11 | 257 | grep Warning output-configure output-make > ./report-test11 |
@@ -269,7 +268,7 @@ rm output-configure output-make | |||
269 | print_title "${arr[12]}" | 268 | print_title "${arr[12]}" |
270 | cd firejail | 269 | cd firejail |
271 | make distclean | 270 | make distclean |
272 | ./configure --prefix=/usr --enable-apparmor --enable-fatal-warnings 2>&1 | tee ../output-configure | 271 | ./configure --prefix=/usr --enable-apparmor --enable-fatal-warnings 2>&1 | tee ../output-configure |
273 | make -j4 2>&1 | tee ../output-make | 272 | make -j4 2>&1 | tee ../output-make |
274 | cd .. | 273 | cd .. |
275 | grep Warning output-configure output-make > ./report-test12 | 274 | grep Warning output-configure output-make > ./report-test12 |
@@ -354,7 +353,7 @@ rm output-configure output-make | |||
354 | print_title "${arr[17]}" | 353 | print_title "${arr[17]}" |
355 | cd firejail | 354 | cd firejail |
356 | make distclean | 355 | make distclean |
357 | ./configure --prefix=/usr --disable-usertmpfs --enable-fatal-warnings 2>&1 | tee ../output-configure | 356 | ./configure --prefix=/usr --disable-usertmpfs --enable-fatal-warnings 2>&1 | tee ../output-configure |
358 | make -j4 2>&1 | tee ../output-make | 357 | make -j4 2>&1 | tee ../output-make |
359 | cd .. | 358 | cd .. |
360 | grep Warning output-configure output-make > ./report-test17 | 359 | grep Warning output-configure output-make > ./report-test17 |
@@ -410,23 +409,23 @@ echo "**********************************************************" | |||
410 | 409 | ||
411 | wc -l report-test* | 410 | wc -l report-test* |
412 | echo | 411 | echo |
413 | echo "Legend:" | 412 | echo "Legend:" |
414 | echo ${arr[1]} | 413 | echo "${arr[1]}" |
415 | echo ${arr[2]} | 414 | echo "${arr[2]}" |
416 | echo ${arr[3]} | 415 | echo "${arr[3]}" |
417 | echo ${arr[4]} | 416 | echo "${arr[4]}" |
418 | echo ${arr[5]} | 417 | echo "${arr[5]}" |
419 | echo ${arr[6]} | 418 | echo "${arr[6]}" |
420 | echo ${arr[7]} | 419 | echo "${arr[7]}" |
421 | echo ${arr[8]} | 420 | echo "${arr[8]}" |
422 | echo ${arr[9]} | 421 | echo "${arr[9]}" |
423 | echo ${arr[10]} | 422 | echo "${arr[10]}" |
424 | echo ${arr[11]} | 423 | echo "${arr[11]}" |
425 | echo ${arr[12]} | 424 | echo "${arr[12]}" |
426 | echo ${arr[13]} | 425 | echo "${arr[13]}" |
427 | echo ${arr[14]} | 426 | echo "${arr[14]}" |
428 | echo ${arr[15]} | 427 | echo "${arr[15]}" |
429 | echo ${arr[16]} | 428 | echo "${arr[16]}" |
430 | echo ${arr[17]} | 429 | echo "${arr[17]}" |
431 | echo ${arr[18]} | 430 | echo "${arr[18]}" |
432 | echo ${arr[19]} | 431 | echo "${arr[19]}" |