diff options
-rw-r--r-- | Makefile.in | 3 | ||||
-rwxr-xr-x | test/compile/compile.sh | 243 |
2 files changed, 0 insertions, 246 deletions
diff --git a/Makefile.in b/Makefile.in index 6c98742b7..1142059a5 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -160,9 +160,6 @@ snap: all | |||
160 | install-snap: snap | 160 | install-snap: snap |
161 | sudo snap remove faudit; sudo snap install faudit*.snap | 161 | sudo snap remove faudit; sudo snap install faudit*.snap |
162 | 162 | ||
163 | github-compile: | ||
164 | cd test/compile; ./compile.sh | ||
165 | |||
166 | dist-compile: dist | 163 | dist-compile: dist |
167 | cd test/dist-compile; ./compile.sh $(NAME)-$(VERSION) | 164 | cd test/dist-compile; ./compile.sh $(NAME)-$(VERSION) |
168 | 165 | ||
diff --git a/test/compile/compile.sh b/test/compile/compile.sh deleted file mode 100755 index 1207ef518..000000000 --- a/test/compile/compile.sh +++ /dev/null | |||
@@ -1,243 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | arr[1]="TEST 1: standard compilation" | ||
4 | arr[2]="TEST 2: compile seccomp disabled" | ||
5 | arr[3]="TEST 3: compile chroot disabled" | ||
6 | arr[4]="TEST 4: compile bind disabled" | ||
7 | arr[5]="TEST 5: compile user namespace disabled" | ||
8 | arr[6]="TEST 6: compile network disabled" | ||
9 | arr[7]="TEST 7: compile X11 disabled" | ||
10 | arr[8]="TEST 8: compile network restricted" | ||
11 | arr[9]="TEST 9: compile file transfer disabled" | ||
12 | |||
13 | |||
14 | # remove previous reports and output file | ||
15 | cleanup() { | ||
16 | rm -f report* | ||
17 | rm -fr firejail | ||
18 | rm -f oc* om* | ||
19 | } | ||
20 | |||
21 | print_title() { | ||
22 | echo | ||
23 | echo | ||
24 | echo | ||
25 | echo "**************************************************" | ||
26 | echo $1 | ||
27 | echo "**************************************************" | ||
28 | } | ||
29 | |||
30 | while [ $# -gt 0 ]; do # Until you run out of parameters . . . | ||
31 | case "$1" in | ||
32 | --clean) | ||
33 | cleanup | ||
34 | exit | ||
35 | ;; | ||
36 | --help) | ||
37 | echo "./compile.sh [--clean|--help]" | ||
38 | exit | ||
39 | ;; | ||
40 | esac | ||
41 | shift # Check next set of parameters. | ||
42 | done | ||
43 | |||
44 | cleanup | ||
45 | |||
46 | #***************************************************************** | ||
47 | # TEST 1 | ||
48 | #***************************************************************** | ||
49 | # - checkout source code | ||
50 | # - check compilation | ||
51 | # - install | ||
52 | #***************************************************************** | ||
53 | print_title "${arr[1]}" | ||
54 | git clone https://github.com/netblue30/firejail.git | ||
55 | cd firejail | ||
56 | ./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
57 | make -j4 2>&1 | tee ../output-make | ||
58 | cd .. | ||
59 | grep Warning output-configure output-make > ./report-test1 | ||
60 | grep Error output-configure output-make >> ./report-test1 | ||
61 | cp output-configure oc1 | ||
62 | cp output-make om1 | ||
63 | rm output-configure output-make | ||
64 | |||
65 | |||
66 | #***************************************************************** | ||
67 | # TEST 2 | ||
68 | #***************************************************************** | ||
69 | # - disable seccomp configuration | ||
70 | # - check compilation | ||
71 | #***************************************************************** | ||
72 | print_title "${arr[2]}" | ||
73 | # seccomp | ||
74 | cd firejail | ||
75 | make distclean | ||
76 | ./configure --prefix=/usr --disable-seccomp --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
77 | make -j4 2>&1 | tee ../output-make | ||
78 | cd .. | ||
79 | grep Warning output-configure output-make > ./report-test2 | ||
80 | grep Error output-configure output-make >> ./report-test2 | ||
81 | cp output-configure oc2 | ||
82 | cp output-make om2 | ||
83 | rm output-configure output-make | ||
84 | |||
85 | #***************************************************************** | ||
86 | # TEST 3 | ||
87 | #***************************************************************** | ||
88 | # - disable chroot configuration | ||
89 | # - check compilation | ||
90 | #***************************************************************** | ||
91 | print_title "${arr[3]}" | ||
92 | # seccomp | ||
93 | cd firejail | ||
94 | make distclean | ||
95 | ./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
96 | make -j4 2>&1 | tee ../output-make | ||
97 | cd .. | ||
98 | grep Warning output-configure output-make > ./report-test3 | ||
99 | grep Error output-configure output-make >> ./report-test3 | ||
100 | cp output-configure oc3 | ||
101 | cp output-make om3 | ||
102 | rm output-configure output-make | ||
103 | |||
104 | #***************************************************************** | ||
105 | # TEST 4 | ||
106 | #***************************************************************** | ||
107 | # - disable bind configuration | ||
108 | # - check compilation | ||
109 | #***************************************************************** | ||
110 | print_title "${arr[4]}" | ||
111 | # seccomp | ||
112 | cd firejail | ||
113 | make distclean | ||
114 | ./configure --prefix=/usr --disable-bind --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
115 | make -j4 2>&1 | tee ../output-make | ||
116 | cd .. | ||
117 | grep Warning output-configure output-make > ./report-test4 | ||
118 | grep Error output-configure output-make >> ./report-test4 | ||
119 | cp output-configure oc4 | ||
120 | cp output-make om4 | ||
121 | rm output-configure output-make | ||
122 | |||
123 | #***************************************************************** | ||
124 | # TEST 5 | ||
125 | #***************************************************************** | ||
126 | # - disable user namespace configuration | ||
127 | # - check compilation | ||
128 | #***************************************************************** | ||
129 | print_title "${arr[5]}" | ||
130 | # seccomp | ||
131 | cd firejail | ||
132 | make distclean | ||
133 | ./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
134 | make -j4 2>&1 | tee ../output-make | ||
135 | cd .. | ||
136 | grep Warning output-configure output-make > ./report-test5 | ||
137 | grep Error output-configure output-make >> ./report-test5 | ||
138 | cp output-configure oc5 | ||
139 | cp output-make om5 | ||
140 | rm output-configure output-make | ||
141 | |||
142 | #***************************************************************** | ||
143 | # TEST 6 | ||
144 | #***************************************************************** | ||
145 | # - disable user namespace configuration | ||
146 | # - check compilation | ||
147 | #***************************************************************** | ||
148 | print_title "${arr[6]}" | ||
149 | # seccomp | ||
150 | cd firejail | ||
151 | make distclean | ||
152 | ./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
153 | make -j4 2>&1 | tee ../output-make | ||
154 | cd .. | ||
155 | grep Warning output-configure output-make > ./report-test6 | ||
156 | grep Error output-configure output-make >> ./report-test6 | ||
157 | cp output-configure oc6 | ||
158 | cp output-make om6 | ||
159 | rm output-configure output-make | ||
160 | |||
161 | #***************************************************************** | ||
162 | # TEST 7 | ||
163 | #***************************************************************** | ||
164 | # - disable X11 support | ||
165 | # - check compilation | ||
166 | #***************************************************************** | ||
167 | print_title "${arr[7]}" | ||
168 | # seccomp | ||
169 | cd firejail | ||
170 | make distclean | ||
171 | ./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
172 | make -j4 2>&1 | tee ../output-make | ||
173 | cd .. | ||
174 | grep Warning output-configure output-make > ./report-test7 | ||
175 | grep Error output-configure output-make >> ./report-test7 | ||
176 | cp output-configure oc7 | ||
177 | cp output-make om7 | ||
178 | rm output-configure output-make | ||
179 | |||
180 | |||
181 | #***************************************************************** | ||
182 | # TEST 8 | ||
183 | #***************************************************************** | ||
184 | # - enable network restricted | ||
185 | # - check compilation | ||
186 | #***************************************************************** | ||
187 | print_title "${arr[8]}" | ||
188 | # seccomp | ||
189 | cd firejail | ||
190 | make distclean | ||
191 | ./configure --prefix=/usr --enable-network=restricted --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
192 | make -j4 2>&1 | tee ../output-make | ||
193 | cd .. | ||
194 | grep Warning output-configure output-make > ./report-test8 | ||
195 | grep Error output-configure output-make >> ./report-test8 | ||
196 | cp output-configure oc8 | ||
197 | cp output-make om8 | ||
198 | rm output-configure output-make | ||
199 | |||
200 | |||
201 | #***************************************************************** | ||
202 | # TEST 9 | ||
203 | #***************************************************************** | ||
204 | # - disable file transfer | ||
205 | # - check compilation | ||
206 | #***************************************************************** | ||
207 | print_title "${arr[9]}" | ||
208 | # seccomp | ||
209 | cd firejail | ||
210 | make distclean | ||
211 | ./configure --prefix=/usr --enable-network=restricted --enable-fatal-warnings 2>&1 | tee ../output-configure | ||
212 | make -j4 2>&1 | tee ../output-make | ||
213 | cd .. | ||
214 | grep Warning output-configure output-make > ./report-test9 | ||
215 | grep Error output-configure output-make >> ./report-test9 | ||
216 | cp output-configure oc9 | ||
217 | cp output-make om9 | ||
218 | rm output-configure output-make | ||
219 | |||
220 | |||
221 | #***************************************************************** | ||
222 | # PRINT REPORTS | ||
223 | #***************************************************************** | ||
224 | echo | ||
225 | echo | ||
226 | echo | ||
227 | echo | ||
228 | echo "**********************************************************" | ||
229 | echo "TEST RESULTS" | ||
230 | echo "**********************************************************" | ||
231 | |||
232 | wc -l report-test* | ||
233 | echo | ||
234 | echo "Legend:" | ||
235 | echo ${arr[1]} | ||
236 | echo ${arr[2]} | ||
237 | echo ${arr[3]} | ||
238 | echo ${arr[4]} | ||
239 | echo ${arr[5]} | ||
240 | echo ${arr[6]} | ||
241 | echo ${arr[7]} | ||
242 | echo ${arr[8]} | ||
243 | echo ${arr[9]} | ||