aboutsummaryrefslogtreecommitdiffstats
path: root/test/compile
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-08-10 09:30:45 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-08-10 09:30:45 -0400
commit8da2daba9de828a965a085e15c7346f53bea2121 (patch)
tree1683e2084707fcc90c5f36108317ef2ad9ad55c8 /test/compile
parentchroot fix (diff)
downloadfirejail-8da2daba9de828a965a085e15c7346f53bea2121.tar.gz
firejail-8da2daba9de828a965a085e15c7346f53bea2121.tar.zst
firejail-8da2daba9de828a965a085e15c7346f53bea2121.zip
removed github-compile make target
Diffstat (limited to 'test/compile')
-rwxr-xr-xtest/compile/compile.sh243
1 files changed, 0 insertions, 243 deletions
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
3arr[1]="TEST 1: standard compilation"
4arr[2]="TEST 2: compile seccomp disabled"
5arr[3]="TEST 3: compile chroot disabled"
6arr[4]="TEST 4: compile bind disabled"
7arr[5]="TEST 5: compile user namespace disabled"
8arr[6]="TEST 6: compile network disabled"
9arr[7]="TEST 7: compile X11 disabled"
10arr[8]="TEST 8: compile network restricted"
11arr[9]="TEST 9: compile file transfer disabled"
12
13
14# remove previous reports and output file
15cleanup() {
16 rm -f report*
17 rm -fr firejail
18 rm -f oc* om*
19}
20
21print_title() {
22 echo
23 echo
24 echo
25 echo "**************************************************"
26 echo $1
27 echo "**************************************************"
28}
29
30while [ $# -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.
42done
43
44cleanup
45
46#*****************************************************************
47# TEST 1
48#*****************************************************************
49# - checkout source code
50# - check compilation
51# - install
52#*****************************************************************
53print_title "${arr[1]}"
54git clone https://github.com/netblue30/firejail.git
55cd firejail
56./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure
57make -j4 2>&1 | tee ../output-make
58cd ..
59grep Warning output-configure output-make > ./report-test1
60grep Error output-configure output-make >> ./report-test1
61cp output-configure oc1
62cp output-make om1
63rm output-configure output-make
64
65
66#*****************************************************************
67# TEST 2
68#*****************************************************************
69# - disable seccomp configuration
70# - check compilation
71#*****************************************************************
72print_title "${arr[2]}"
73# seccomp
74cd firejail
75make distclean
76./configure --prefix=/usr --disable-seccomp --enable-fatal-warnings 2>&1 | tee ../output-configure
77make -j4 2>&1 | tee ../output-make
78cd ..
79grep Warning output-configure output-make > ./report-test2
80grep Error output-configure output-make >> ./report-test2
81cp output-configure oc2
82cp output-make om2
83rm output-configure output-make
84
85#*****************************************************************
86# TEST 3
87#*****************************************************************
88# - disable chroot configuration
89# - check compilation
90#*****************************************************************
91print_title "${arr[3]}"
92# seccomp
93cd firejail
94make distclean
95./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure
96make -j4 2>&1 | tee ../output-make
97cd ..
98grep Warning output-configure output-make > ./report-test3
99grep Error output-configure output-make >> ./report-test3
100cp output-configure oc3
101cp output-make om3
102rm output-configure output-make
103
104#*****************************************************************
105# TEST 4
106#*****************************************************************
107# - disable bind configuration
108# - check compilation
109#*****************************************************************
110print_title "${arr[4]}"
111# seccomp
112cd firejail
113make distclean
114./configure --prefix=/usr --disable-bind --enable-fatal-warnings 2>&1 | tee ../output-configure
115make -j4 2>&1 | tee ../output-make
116cd ..
117grep Warning output-configure output-make > ./report-test4
118grep Error output-configure output-make >> ./report-test4
119cp output-configure oc4
120cp output-make om4
121rm output-configure output-make
122
123#*****************************************************************
124# TEST 5
125#*****************************************************************
126# - disable user namespace configuration
127# - check compilation
128#*****************************************************************
129print_title "${arr[5]}"
130# seccomp
131cd firejail
132make distclean
133./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure
134make -j4 2>&1 | tee ../output-make
135cd ..
136grep Warning output-configure output-make > ./report-test5
137grep Error output-configure output-make >> ./report-test5
138cp output-configure oc5
139cp output-make om5
140rm output-configure output-make
141
142#*****************************************************************
143# TEST 6
144#*****************************************************************
145# - disable user namespace configuration
146# - check compilation
147#*****************************************************************
148print_title "${arr[6]}"
149# seccomp
150cd firejail
151make distclean
152./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure
153make -j4 2>&1 | tee ../output-make
154cd ..
155grep Warning output-configure output-make > ./report-test6
156grep Error output-configure output-make >> ./report-test6
157cp output-configure oc6
158cp output-make om6
159rm output-configure output-make
160
161#*****************************************************************
162# TEST 7
163#*****************************************************************
164# - disable X11 support
165# - check compilation
166#*****************************************************************
167print_title "${arr[7]}"
168# seccomp
169cd firejail
170make distclean
171./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure
172make -j4 2>&1 | tee ../output-make
173cd ..
174grep Warning output-configure output-make > ./report-test7
175grep Error output-configure output-make >> ./report-test7
176cp output-configure oc7
177cp output-make om7
178rm output-configure output-make
179
180
181#*****************************************************************
182# TEST 8
183#*****************************************************************
184# - enable network restricted
185# - check compilation
186#*****************************************************************
187print_title "${arr[8]}"
188# seccomp
189cd firejail
190make distclean
191./configure --prefix=/usr --enable-network=restricted --enable-fatal-warnings 2>&1 | tee ../output-configure
192make -j4 2>&1 | tee ../output-make
193cd ..
194grep Warning output-configure output-make > ./report-test8
195grep Error output-configure output-make >> ./report-test8
196cp output-configure oc8
197cp output-make om8
198rm output-configure output-make
199
200
201#*****************************************************************
202# TEST 9
203#*****************************************************************
204# - disable file transfer
205# - check compilation
206#*****************************************************************
207print_title "${arr[9]}"
208# seccomp
209cd firejail
210make distclean
211./configure --prefix=/usr --enable-network=restricted --enable-fatal-warnings 2>&1 | tee ../output-configure
212make -j4 2>&1 | tee ../output-make
213cd ..
214grep Warning output-configure output-make > ./report-test9
215grep Error output-configure output-make >> ./report-test9
216cp output-configure oc9
217cp output-make om9
218rm output-configure output-make
219
220
221#*****************************************************************
222# PRINT REPORTS
223#*****************************************************************
224echo
225echo
226echo
227echo
228echo "**********************************************************"
229echo "TEST RESULTS"
230echo "**********************************************************"
231
232wc -l report-test*
233echo
234echo "Legend:"
235echo ${arr[1]}
236echo ${arr[2]}
237echo ${arr[3]}
238echo ${arr[4]}
239echo ${arr[5]}
240echo ${arr[6]}
241echo ${arr[7]}
242echo ${arr[8]}
243echo ${arr[9]}