diff options
Diffstat (limited to 'test/compile/compile.sh')
-rwxr-xr-x | test/compile/compile.sh | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/test/compile/compile.sh b/test/compile/compile.sh index da6e43a5a..0e3425f8d 100755 --- a/test/compile/compile.sh +++ b/test/compile/compile.sh | |||
@@ -11,7 +11,8 @@ | |||
11 | # install contrib scripts | 11 | # install contrib scripts |
12 | # --enable-analyzer enable GCC 10 static analyzer | 12 | # --enable-analyzer enable GCC 10 static analyzer |
13 | 13 | ||
14 | 14 | # shellcheck source=config.sh | |
15 | . "$(dirname "$0")/../../config.sh" || exit 1 | ||
15 | 16 | ||
16 | arr[1]="TEST 1: standard compilation" | 17 | arr[1]="TEST 1: standard compilation" |
17 | arr[2]="TEST 2: compile dbus proxy disabled" | 18 | arr[2]="TEST 2: compile dbus proxy disabled" |
@@ -51,7 +52,7 @@ print_title() { | |||
51 | echo "**************************************************" | 52 | echo "**************************************************" |
52 | } | 53 | } |
53 | 54 | ||
54 | DIST="$1" | 55 | DIST="$(TARNAME)-$(VERSION)" |
55 | while [[ $# -gt 0 ]]; do # Until you run out of parameters . . . | 56 | while [[ $# -gt 0 ]]; do # Until you run out of parameters . . . |
56 | case "$1" in | 57 | case "$1" in |
57 | --clean) | 58 | --clean) |
@@ -79,7 +80,7 @@ echo "$DIST" | |||
79 | tar -xJvf ../../"$DIST.tar.xz" | 80 | tar -xJvf ../../"$DIST.tar.xz" |
80 | mv "$DIST" firejail | 81 | mv "$DIST" firejail |
81 | 82 | ||
82 | cd firejail | 83 | cd firejail || exit 1 |
83 | ./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure | 84 | ./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure |
84 | make -j4 2>&1 | tee ../output-make | 85 | make -j4 2>&1 | tee ../output-make |
85 | cd .. | 86 | cd .. |
@@ -95,7 +96,7 @@ rm output-configure output-make | |||
95 | # - disable dbus proxy configuration | 96 | # - disable dbus proxy configuration |
96 | #***************************************************************** | 97 | #***************************************************************** |
97 | print_title "${arr[2]}" | 98 | print_title "${arr[2]}" |
98 | cd firejail | 99 | cd firejail || exit 1 |
99 | make distclean | 100 | make distclean |
100 | ./configure --prefix=/usr --disable-dbusproxy --enable-fatal-warnings 2>&1 | tee ../output-configure | 101 | ./configure --prefix=/usr --disable-dbusproxy --enable-fatal-warnings 2>&1 | tee ../output-configure |
101 | make -j4 2>&1 | tee ../output-make | 102 | make -j4 2>&1 | tee ../output-make |
@@ -112,7 +113,7 @@ rm output-configure output-make | |||
112 | # - disable chroot configuration | 113 | # - disable chroot configuration |
113 | #***************************************************************** | 114 | #***************************************************************** |
114 | print_title "${arr[3]}" | 115 | print_title "${arr[3]}" |
115 | cd firejail | 116 | cd firejail || exit 1 |
116 | make distclean | 117 | make distclean |
117 | ./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure | 118 | ./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure |
118 | make -j4 2>&1 | tee ../output-make | 119 | make -j4 2>&1 | tee ../output-make |
@@ -129,7 +130,7 @@ rm output-configure output-make | |||
129 | # - disable firetunnel configuration | 130 | # - disable firetunnel configuration |
130 | #***************************************************************** | 131 | #***************************************************************** |
131 | print_title "${arr[4]}" | 132 | print_title "${arr[4]}" |
132 | cd firejail | 133 | cd firejail || exit 1 |
133 | make distclean | 134 | make distclean |
134 | ./configure --prefix=/usr --disable-firetunnel --enable-fatal-warnings 2>&1 | tee ../output-configure | 135 | ./configure --prefix=/usr --disable-firetunnel --enable-fatal-warnings 2>&1 | tee ../output-configure |
135 | make -j4 2>&1 | tee ../output-make | 136 | make -j4 2>&1 | tee ../output-make |
@@ -146,7 +147,7 @@ rm output-configure output-make | |||
146 | # - disable user namespace configuration | 147 | # - disable user namespace configuration |
147 | #***************************************************************** | 148 | #***************************************************************** |
148 | print_title "${arr[5]}" | 149 | print_title "${arr[5]}" |
149 | cd firejail | 150 | cd firejail || exit 1 |
150 | make distclean | 151 | make distclean |
151 | ./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure | 152 | ./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure |
152 | make -j4 2>&1 | tee ../output-make | 153 | make -j4 2>&1 | tee ../output-make |
@@ -164,7 +165,7 @@ rm output-configure output-make | |||
164 | # - check compilation | 165 | # - check compilation |
165 | #***************************************************************** | 166 | #***************************************************************** |
166 | print_title "${arr[6]}" | 167 | print_title "${arr[6]}" |
167 | cd firejail | 168 | cd firejail || exit 1 |
168 | make distclean | 169 | make distclean |
169 | ./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure | 170 | ./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure |
170 | make -j4 2>&1 | tee ../output-make | 171 | make -j4 2>&1 | tee ../output-make |
@@ -181,7 +182,7 @@ rm output-configure output-make | |||
181 | # - disable X11 support | 182 | # - disable X11 support |
182 | #***************************************************************** | 183 | #***************************************************************** |
183 | print_title "${arr[7]}" | 184 | print_title "${arr[7]}" |
184 | cd firejail | 185 | cd firejail || exit 1 |
185 | make distclean | 186 | make distclean |
186 | ./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure | 187 | ./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure |
187 | make -j4 2>&1 | tee ../output-make | 188 | make -j4 2>&1 | tee ../output-make |
@@ -198,7 +199,7 @@ rm output-configure output-make | |||
198 | # - enable selinux | 199 | # - enable selinux |
199 | #***************************************************************** | 200 | #***************************************************************** |
200 | print_title "${arr[8]}" | 201 | print_title "${arr[8]}" |
201 | cd firejail | 202 | cd firejail || exit 1 |
202 | make distclean | 203 | make distclean |
203 | ./configure --prefix=/usr --enable-selinux --enable-fatal-warnings 2>&1 | tee ../output-configure | 204 | ./configure --prefix=/usr --enable-selinux --enable-fatal-warnings 2>&1 | tee ../output-configure |
204 | make -j4 2>&1 | tee ../output-make | 205 | make -j4 2>&1 | tee ../output-make |
@@ -215,7 +216,7 @@ rm output-configure output-make | |||
215 | # - disable file transfer | 216 | # - disable file transfer |
216 | #***************************************************************** | 217 | #***************************************************************** |
217 | print_title "${arr[9]}" | 218 | print_title "${arr[9]}" |
218 | cd firejail | 219 | cd firejail || exit 1 |
219 | make distclean | 220 | make distclean |
220 | ./configure --prefix=/usr --disable-file-transfer --enable-fatal-warnings 2>&1 | tee ../output-configure | 221 | ./configure --prefix=/usr --disable-file-transfer --enable-fatal-warnings 2>&1 | tee ../output-configure |
221 | make -j4 2>&1 | tee ../output-make | 222 | make -j4 2>&1 | tee ../output-make |
@@ -232,7 +233,7 @@ rm output-configure output-make | |||
232 | # - disable whitelist | 233 | # - disable whitelist |
233 | #***************************************************************** | 234 | #***************************************************************** |
234 | print_title "${arr[10]}" | 235 | print_title "${arr[10]}" |
235 | cd firejail | 236 | cd firejail || exit 1 |
236 | make distclean | 237 | make distclean |
237 | ./configure --prefix=/usr --disable-whitelist --enable-fatal-warnings 2>&1 | tee ../output-configure | 238 | ./configure --prefix=/usr --disable-whitelist --enable-fatal-warnings 2>&1 | tee ../output-configure |
238 | make -j4 2>&1 | tee ../output-make | 239 | make -j4 2>&1 | tee ../output-make |
@@ -249,7 +250,7 @@ rm output-configure output-make | |||
249 | # - disable global config | 250 | # - disable global config |
250 | #***************************************************************** | 251 | #***************************************************************** |
251 | print_title "${arr[11]}" | 252 | print_title "${arr[11]}" |
252 | cd firejail | 253 | cd firejail || exit 1 |
253 | make distclean | 254 | make distclean |
254 | ./configure --prefix=/usr --disable-globalcfg --enable-fatal-warnings 2>&1 | tee ../output-configure | 255 | ./configure --prefix=/usr --disable-globalcfg --enable-fatal-warnings 2>&1 | tee ../output-configure |
255 | make -j4 2>&1 | tee ../output-make | 256 | make -j4 2>&1 | tee ../output-make |
@@ -266,7 +267,7 @@ rm output-configure output-make | |||
266 | # - enable apparmor | 267 | # - enable apparmor |
267 | #***************************************************************** | 268 | #***************************************************************** |
268 | print_title "${arr[12]}" | 269 | print_title "${arr[12]}" |
269 | cd firejail | 270 | cd firejail || exit 1 |
270 | make distclean | 271 | make distclean |
271 | ./configure --prefix=/usr --enable-apparmor --enable-fatal-warnings 2>&1 | tee ../output-configure | 272 | ./configure --prefix=/usr --enable-apparmor --enable-fatal-warnings 2>&1 | tee ../output-configure |
272 | make -j4 2>&1 | tee ../output-make | 273 | make -j4 2>&1 | tee ../output-make |
@@ -283,7 +284,7 @@ rm output-configure output-make | |||
283 | # - enable busybox workaround | 284 | # - enable busybox workaround |
284 | #***************************************************************** | 285 | #***************************************************************** |
285 | print_title "${arr[13]}" | 286 | print_title "${arr[13]}" |
286 | cd firejail | 287 | cd firejail || exit 1 |
287 | make distclean | 288 | make distclean |
288 | ./configure --prefix=/usr --enable-busybox-workaround --enable-fatal-warnings 2>&1 | tee ../output-configure | 289 | ./configure --prefix=/usr --enable-busybox-workaround --enable-fatal-warnings 2>&1 | tee ../output-configure |
289 | make -j4 2>&1 | tee ../output-make | 290 | make -j4 2>&1 | tee ../output-make |
@@ -300,7 +301,7 @@ rm output-configure output-make | |||
300 | # - disable overlayfs | 301 | # - disable overlayfs |
301 | #***************************************************************** | 302 | #***************************************************************** |
302 | print_title "${arr[14]}" | 303 | print_title "${arr[14]}" |
303 | cd firejail | 304 | cd firejail || exit 1 |
304 | make distclean | 305 | make distclean |
305 | ./configure --prefix=/usr --disable-overlayfs --enable-fatal-warnings 2>&1 | tee ../output-configure | 306 | ./configure --prefix=/usr --disable-overlayfs --enable-fatal-warnings 2>&1 | tee ../output-configure |
306 | make -j4 2>&1 | tee ../output-make | 307 | make -j4 2>&1 | tee ../output-make |
@@ -317,7 +318,7 @@ rm output-configure output-make | |||
317 | # - disable private home | 318 | # - disable private home |
318 | #***************************************************************** | 319 | #***************************************************************** |
319 | print_title "${arr[15]}" | 320 | print_title "${arr[15]}" |
320 | cd firejail | 321 | cd firejail || exit 1 |
321 | make distclean | 322 | make distclean |
322 | ./configure --prefix=/usr --disable-private-home --enable-fatal-warnings 2>&1 | tee ../output-configure | 323 | ./configure --prefix=/usr --disable-private-home --enable-fatal-warnings 2>&1 | tee ../output-configure |
323 | make -j4 2>&1 | tee ../output-make | 324 | make -j4 2>&1 | tee ../output-make |
@@ -334,7 +335,7 @@ rm output-configure output-make | |||
334 | # - disable manpages | 335 | # - disable manpages |
335 | #***************************************************************** | 336 | #***************************************************************** |
336 | print_title "${arr[16]}" | 337 | print_title "${arr[16]}" |
337 | cd firejail | 338 | cd firejail || exit 1 |
338 | make distclean | 339 | make distclean |
339 | ./configure --prefix=/usr --disable-man --enable-fatal-warnings 2>&1 | tee ../output-configure | 340 | ./configure --prefix=/usr --disable-man --enable-fatal-warnings 2>&1 | tee ../output-configure |
340 | make -j4 2>&1 | tee ../output-make | 341 | make -j4 2>&1 | tee ../output-make |
@@ -351,7 +352,7 @@ rm output-configure output-make | |||
351 | # - disable tmpfs as regular user" | 352 | # - disable tmpfs as regular user" |
352 | #***************************************************************** | 353 | #***************************************************************** |
353 | print_title "${arr[17]}" | 354 | print_title "${arr[17]}" |
354 | cd firejail | 355 | cd firejail || exit 1 |
355 | make distclean | 356 | make distclean |
356 | ./configure --prefix=/usr --disable-usertmpfs --enable-fatal-warnings 2>&1 | tee ../output-configure | 357 | ./configure --prefix=/usr --disable-usertmpfs --enable-fatal-warnings 2>&1 | tee ../output-configure |
357 | make -j4 2>&1 | tee ../output-make | 358 | make -j4 2>&1 | tee ../output-make |
@@ -368,7 +369,7 @@ rm output-configure output-make | |||
368 | # - disable private home feature | 369 | # - disable private home feature |
369 | #***************************************************************** | 370 | #***************************************************************** |
370 | print_title "${arr[18]}" | 371 | print_title "${arr[18]}" |
371 | cd firejail | 372 | cd firejail || exit 1 |
372 | make distclean | 373 | make distclean |
373 | ./configure --prefix=/usr --disable-private-home --enable-fatal-warnings 2>&1 | tee ../output-configure | 374 | ./configure --prefix=/usr --disable-private-home --enable-fatal-warnings 2>&1 | tee ../output-configure |
374 | make -j4 2>&1 | tee ../output-make | 375 | make -j4 2>&1 | tee ../output-make |
@@ -385,7 +386,7 @@ rm output-configure output-make | |||
385 | # - enable ids | 386 | # - enable ids |
386 | #***************************************************************** | 387 | #***************************************************************** |
387 | print_title "${arr[19]}" | 388 | print_title "${arr[19]}" |
388 | cd firejail | 389 | cd firejail || exit 1 |
389 | make distclean | 390 | make distclean |
390 | ./configure --prefix=/usr --enable-ids --enable-fatal-warnings 2>&1 | tee ../output-configure | 391 | ./configure --prefix=/usr --enable-ids --enable-fatal-warnings 2>&1 | tee ../output-configure |
391 | make -j4 2>&1 | tee ../output-make | 392 | make -j4 2>&1 | tee ../output-make |