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