From 820de6829fedccffb8b3c32f079436fa7e89273e Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 24 Aug 2015 09:05:18 -0400 Subject: added --env option --- test/env.exp | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 test/env.exp (limited to 'test/env.exp') 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 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +#*********************************************** +send -- "firejail --env=ENV1=env1 --env=ENV2=env2 --env=ENV3=env3\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "env | grep ENV\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "ENV1" +} +send -- "env | grep ENV\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "ENV2" +} +send -- "env | grep ENV\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "ENV3" +} +send -- "exit\r" +sleep 1 + +#*********************************************** +send -- "firejail --profile=env.profile\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} +sleep 1 +send -- "env | grep LD_LIBRARY_PATH\r" +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "/opt/test/lib" +} +send -- "env | grep CFLAGS\r" +expect { + timeout {puts "TESTING ERROR 6\n";exit} + "Wall" +} +expect { + timeout {puts "TESTING ERROR 7\n";exit} + "Werror" +} + +puts "\n" -- cgit v1.2.3-54-g00ecf