aboutsummaryrefslogtreecommitdiffstats
path: root/test/env.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-24 09:05:18 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-24 09:05:18 -0400
commit820de6829fedccffb8b3c32f079436fa7e89273e (patch)
treea1e0cf62b892e91d18de28d7459180339c5636d1 /test/env.exp
parentprivate-home testing (diff)
downloadfirejail-820de6829fedccffb8b3c32f079436fa7e89273e.tar.gz
firejail-820de6829fedccffb8b3c32f079436fa7e89273e.tar.zst
firejail-820de6829fedccffb8b3c32f079436fa7e89273e.zip
added --env option
Diffstat (limited to 'test/env.exp')
-rwxr-xr-xtest/env.exp55
1 files changed, 55 insertions, 0 deletions
diff --git a/test/env.exp b/test/env.exp
new file mode 100755
index 000000000..d2edb0477
--- /dev/null
+++ b/test/env.exp
@@ -0,0 +1,55 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7#***********************************************
8send -- "firejail --env=ENV1=env1 --env=ENV2=env2 --env=ENV3=env3\r"
9expect {
10 timeout {puts "TESTING ERROR 0\n";exit}
11 "Child process initialized"
12}
13sleep 1
14
15send -- "env | grep ENV\r"
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 "ENV1"
19}
20send -- "env | grep ENV\r"
21expect {
22 timeout {puts "TESTING ERROR 2\n";exit}
23 "ENV2"
24}
25send -- "env | grep ENV\r"
26expect {
27 timeout {puts "TESTING ERROR 3\n";exit}
28 "ENV3"
29}
30send -- "exit\r"
31sleep 1
32
33#***********************************************
34send -- "firejail --profile=env.profile\r"
35expect {
36 timeout {puts "TESTING ERROR 4\n";exit}
37 "Child process initialized"
38}
39sleep 1
40send -- "env | grep LD_LIBRARY_PATH\r"
41expect {
42 timeout {puts "TESTING ERROR 5\n";exit}
43 "/opt/test/lib"
44}
45send -- "env | grep CFLAGS\r"
46expect {
47 timeout {puts "TESTING ERROR 6\n";exit}
48 "Wall"
49}
50expect {
51 timeout {puts "TESTING ERROR 7\n";exit}
52 "Werror"
53}
54
55puts "\n"