aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment/env.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-24 06:32:15 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-24 06:32:15 -0400
commit020c5449036c461ea1829e854da43429322059d6 (patch)
tree46ca4f358fcc1c50be77586ccdb0e02170d81e1d /test/environment/env.exp
parenttesting (diff)
downloadfirejail-020c5449036c461ea1829e854da43429322059d6.tar.gz
firejail-020c5449036c461ea1829e854da43429322059d6.tar.zst
firejail-020c5449036c461ea1829e854da43429322059d6.zip
testing
Diffstat (limited to 'test/environment/env.exp')
-rwxr-xr-xtest/environment/env.exp58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/environment/env.exp b/test/environment/env.exp
new file mode 100755
index 000000000..a09c3f9c5
--- /dev/null
+++ b/test/environment/env.exp
@@ -0,0 +1,58 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10#***********************************************
11send -- "firejail --env=ENV1=env1 --env=ENV2=env2 --env=ENV3=env3\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized"
15}
16sleep 1
17
18send -- "env | grep ENV1\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "ENV1"
22}
23send -- "env | grep ENV2\r"
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 "ENV2"
27}
28send -- "env | grep ENV3\r"
29expect {
30 timeout {puts "TESTING ERROR 3\n";exit}
31 "ENV3"
32}
33send -- "exit\r"
34sleep 1
35
36#***********************************************
37send -- "firejail --profile=env.profile\r"
38expect {
39 timeout {puts "TESTING ERROR 4\n";exit}
40 "Child process initialized"
41}
42sleep 1
43send -- "env | grep LD_LIBRARY_PATH\r"
44expect {
45 timeout {puts "TESTING ERROR 5\n";exit}
46 "/opt/test/lib"
47}
48send -- "env | grep CFLAGS\r"
49expect {
50 timeout {puts "TESTING ERROR 6\n";exit}
51 "Wall"
52}
53expect {
54 timeout {puts "TESTING ERROR 7\n";exit}
55 "Werror"
56}
57
58puts "\nall done\n"