diff options
Diffstat (limited to 'test/environment/environment.sh')
-rwxr-xr-x | test/environment/environment.sh | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/test/environment/environment.sh b/test/environment/environment.sh new file mode 100755 index 000000000..5c4d49331 --- /dev/null +++ b/test/environment/environment.sh | |||
@@ -0,0 +1,87 @@ | |||
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 | echo "TESTING: DNS (test/environment/dns.exp)" | ||
10 | ./dns.exp | ||
11 | |||
12 | echo "TESTING: doubledash (test/environment/doubledash.exp" | ||
13 | mkdir -- -testdir | ||
14 | touch -- -testdir/ttt | ||
15 | cp -- /bin/bash -testdir/. | ||
16 | ./doubledash.exp | ||
17 | rm -fr -- -testdir | ||
18 | |||
19 | echo "TESTING: output (test/environment/output.exp)" | ||
20 | ./output.exp | ||
21 | |||
22 | echo "TESTING: extract command (extract_command.exp)" | ||
23 | ./extract_command.exp | ||
24 | |||
25 | echo "TESTING: environment variables (test/environment/env.exp)" | ||
26 | ./env.exp | ||
27 | |||
28 | echo "TESTING: shell none(test/environment/shell-none.exp)" | ||
29 | ./shell-none.exp | ||
30 | |||
31 | which dash | ||
32 | if [ "$?" -eq 0 ]; | ||
33 | then | ||
34 | echo "TESTING: dash (test/environment/dash.exp)" | ||
35 | ./dash.exp | ||
36 | else | ||
37 | echo "TESTING SKIP: dash not found" | ||
38 | fi | ||
39 | |||
40 | which csh | ||
41 | if [ "$?" -eq 0 ]; | ||
42 | then | ||
43 | echo "TESTING: csh (test/environment/csh.exp)" | ||
44 | ./csh.exp | ||
45 | else | ||
46 | echo "TESTING SKIP: csh not found" | ||
47 | fi | ||
48 | |||
49 | which zsh | ||
50 | if [ "$?" -eq 0 ]; | ||
51 | then | ||
52 | echo "TESTING: zsh (test/environment/zsh.exp)" | ||
53 | ./zsh.exp | ||
54 | else | ||
55 | echo "TESTING SKIP: zsh not found" | ||
56 | fi | ||
57 | |||
58 | echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail-in-firejail.exp)" | ||
59 | ./firejail-in-firejail.exp | ||
60 | |||
61 | echo "TESTING: firejail in firejail - force new sandbox (test/environment/firejail-in-firejail2.exp)" | ||
62 | ./firejail-in-firejail2.exp | ||
63 | |||
64 | which aplay | ||
65 | if [ "$?" -eq 0 ]; | ||
66 | then | ||
67 | echo "TESTING: sound (test/environment/sound.exp)" | ||
68 | ./sound.exp | ||
69 | else | ||
70 | echo "TESTING SKIP: aplay not found" | ||
71 | fi | ||
72 | |||
73 | echo "TESTING: nice (test/environment/nice.exp)" | ||
74 | ./nice.exp | ||
75 | |||
76 | echo "TESTING: quiet (test/environment/quiet.exp)" | ||
77 | ./quiet.exp | ||
78 | |||
79 | which strace | ||
80 | if [ "$?" -eq 0 ]; | ||
81 | then | ||
82 | echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" | ||
83 | ./allow-debuggers.exp | ||
84 | else | ||
85 | echo "TESTING SKIP: strace not found" | ||
86 | fi | ||
87 | |||