diff options
-rw-r--r-- | test/name.profile | 1 | ||||
-rwxr-xr-x | test/option-join-profile.exp | 39 | ||||
-rwxr-xr-x | test/test.sh | 3 |
3 files changed, 43 insertions, 0 deletions
diff --git a/test/name.profile b/test/name.profile new file mode 100644 index 000000000..69e605600 --- /dev/null +++ b/test/name.profile | |||
@@ -0,0 +1 @@ | |||
name svntesting | |||
diff --git a/test/option-join-profile.exp b/test/option-join-profile.exp new file mode 100755 index 000000000..d208a7f23 --- /dev/null +++ b/test/option-join-profile.exp | |||
@@ -0,0 +1,39 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --profile=name.profile\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 3 | ||
13 | |||
14 | spawn $env(SHELL) | ||
15 | send -- "firejail --join=svntesting;pwd\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 1\n";exit} | ||
18 | "Switching to pid" | ||
19 | } | ||
20 | sleep 1 | ||
21 | |||
22 | |||
23 | spawn $env(SHELL) | ||
24 | send -- "firejail --shutdown=svntesting;pwd\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
27 | "home" | ||
28 | } | ||
29 | sleep 1 | ||
30 | |||
31 | send -- "firejail --list;pwd\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 4\n";exit} | ||
34 | "svntesting" {puts "TESTING ERROR 5\n";exit} | ||
35 | "home" | ||
36 | } | ||
37 | sleep 1 | ||
38 | |||
39 | puts "\nall done\n" | ||
diff --git a/test/test.sh b/test/test.sh index 86ae874d9..78fc7b974 100755 --- a/test/test.sh +++ b/test/test.sh | |||
@@ -95,6 +95,9 @@ echo "TESTING: shutdown" | |||
95 | echo "TESTING: join" | 95 | echo "TESTING: join" |
96 | ./option-join.exp | 96 | ./option-join.exp |
97 | 97 | ||
98 | echo "TESTING: join profile" | ||
99 | ./option-join-profile.exp | ||
100 | |||
98 | echo "TESTING: firejail in firejail" | 101 | echo "TESTING: firejail in firejail" |
99 | ./firejail-in-firejail.exp | 102 | ./firejail-in-firejail.exp |
100 | 103 | ||