diff options
Diffstat (limited to 'test/environment/environment.sh')
-rwxr-xr-x | test/environment/environment.sh | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/test/environment/environment.sh b/test/environment/environment.sh new file mode 100755 index 000000000..2bb5a249e --- /dev/null +++ b/test/environment/environment.sh | |||
@@ -0,0 +1,113 @@ | |||
1 | #!/bin/bash | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | export MALLOC_CHECK_=3 | ||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
8 | |||
9 | |||
10 | echo "TESTING: DNS (test/environment/dns.exp)" | ||
11 | ./dns.exp | ||
12 | |||
13 | echo "TESTING: doubledash (test/environment/doubledash.exp" | ||
14 | mkdir -- -testdir | ||
15 | touch -- -testdir/ttt | ||
16 | cp -- /bin/bash -testdir/. | ||
17 | ./doubledash.exp | ||
18 | rm -fr -- -testdir | ||
19 | |||
20 | echo "TESTING: output (test/environment/output.exp)" | ||
21 | ./output.exp | ||
22 | |||
23 | echo "TESTING: extract command (extract_command.exp)" | ||
24 | ./extract_command.exp | ||
25 | |||
26 | echo "TESTING: environment variables (test/environment/env.exp)" | ||
27 | ./env.exp | ||
28 | |||
29 | echo "TESTING: shell none(test/environment/shell-none.exp)" | ||
30 | ./shell-none.exp | ||
31 | |||
32 | which dash | ||
33 | if [ "$?" -eq 0 ]; | ||
34 | then | ||
35 | echo "TESTING: dash (test/environment/dash.exp)" | ||
36 | ./dash.exp | ||
37 | else | ||
38 | echo "TESTING SKIP: dash not found" | ||
39 | fi | ||
40 | |||
41 | which csh | ||
42 | if [ "$?" -eq 0 ]; | ||
43 | then | ||
44 | echo "TESTING: csh (test/environment/csh.exp)" | ||
45 | ./csh.exp | ||
46 | else | ||
47 | echo "TESTING SKIP: csh not found" | ||
48 | fi | ||
49 | |||
50 | which zsh | ||
51 | if [ "$?" -eq 0 ]; | ||
52 | then | ||
53 | echo "TESTING: zsh (test/environment/zsh.exp)" | ||
54 | ./zsh.exp | ||
55 | else | ||
56 | echo "TESTING SKIP: zsh not found" | ||
57 | fi | ||
58 | |||
59 | echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail-in-firejail.exp)" | ||
60 | ./firejail-in-firejail.exp | ||
61 | |||
62 | echo "TESTING: firejail in firejail - force new sandbox (test/environment/firejail-in-firejail2.exp)" | ||
63 | ./firejail-in-firejail2.exp | ||
64 | |||
65 | which aplay | ||
66 | if [ "$?" -eq 0 ]; | ||
67 | then | ||
68 | echo "TESTING: sound (test/environment/sound.exp)" | ||
69 | ./sound.exp | ||
70 | else | ||
71 | echo "TESTING SKIP: aplay not found" | ||
72 | fi | ||
73 | |||
74 | echo "TESTING: nice (test/environment/nice.exp)" | ||
75 | ./nice.exp | ||
76 | |||
77 | echo "TESTING: quiet (test/environment/quiet.exp)" | ||
78 | ./quiet.exp | ||
79 | |||
80 | which strace | ||
81 | if [ "$?" -eq 0 ]; | ||
82 | then | ||
83 | echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" | ||
84 | ./allow-debuggers.exp | ||
85 | else | ||
86 | echo "TESTING SKIP: strace not found" | ||
87 | fi | ||
88 | |||
89 | # to install ibus: | ||
90 | # $ sudo apt-get install ibus-table-array30 | ||
91 | # $ ibus-setup | ||
92 | |||
93 | find ~/.config/ibus/bus | grep unix-0 | ||
94 | if [ "$?" -eq 0 ]; | ||
95 | then | ||
96 | echo "TESTING: ibus (test/environment/ibus.exp)" | ||
97 | ./ibus.exp | ||
98 | else | ||
99 | echo "TESTING SKIP: ibus not configured" | ||
100 | fi | ||
101 | |||
102 | echo "TESTING: rlimit (test/rlimit/rlimit.exp)" | ||
103 | ./rlimit.exp | ||
104 | |||
105 | echo "TESTING: rlimit profile (test/rlimit/rlimit-profile.exp)" | ||
106 | ./rlimit-profile.exp | ||
107 | |||
108 | echo "TESTING: rlimit errors (test/rlimit/rlimit-bad.exp)" | ||
109 | ./rlimit-bad.exp | ||
110 | |||
111 | echo "TESTING: rlimit errors profile (test/rlimit/rlimit-bad-profile.exp)" | ||
112 | ./rlimit-bad-profile.exp | ||
113 | |||