diff options
author | netblue30 <netblue30@yahoo.com> | 2016-06-28 08:41:51 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-06-28 08:41:51 -0400 |
commit | e413b78c49234ae2698f0d9f27945c30ef723fe0 (patch) | |
tree | 3a653fc1e3850ab5e77b992854ef3e85be038db4 /test/sysutils | |
parent | sysutils (diff) | |
download | firejail-e413b78c49234ae2698f0d9f27945c30ef723fe0.tar.gz firejail-e413b78c49234ae2698f0d9f27945c30ef723fe0.tar.zst firejail-e413b78c49234ae2698f0d9f27945c30ef723fe0.zip |
sysutils
Diffstat (limited to 'test/sysutils')
-rwxr-xr-x | test/sysutils/less.exp | 20 | ||||
-rwxr-xr-x | test/sysutils/sysutils.sh | 18 | ||||
-rwxr-xr-x | test/sysutils/xz.exp | 26 |
3 files changed, 64 insertions, 0 deletions
diff --git a/test/sysutils/less.exp b/test/sysutils/less.exp new file mode 100755 index 000000000..720830304 --- /dev/null +++ b/test/sysutils/less.exp | |||
@@ -0,0 +1,20 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail less ../../Makefile.in\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "MYLIBS" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 2\n";exit} | ||
17 | "APPS" | ||
18 | } | ||
19 | |||
20 | puts "\nall done\n" | ||
diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh index f230c9a6b..d75738f97 100755 --- a/test/sysutils/sysutils.sh +++ b/test/sysutils/sysutils.sh | |||
@@ -42,3 +42,21 @@ else | |||
42 | echo "TESTING SKIP: xzdec not found" | 42 | echo "TESTING SKIP: xzdec not found" |
43 | fi | 43 | fi |
44 | 44 | ||
45 | which xz | ||
46 | if [ "$?" -eq 0 ]; | ||
47 | then | ||
48 | echo "TESTING: xz" | ||
49 | ./xz.exp | ||
50 | else | ||
51 | echo "TESTING SKIP: xz not found" | ||
52 | fi | ||
53 | |||
54 | which less | ||
55 | if [ "$?" -eq 0 ]; | ||
56 | then | ||
57 | echo "TESTING: less" | ||
58 | ./less.exp | ||
59 | else | ||
60 | echo "TESTING SKIP: less not found" | ||
61 | fi | ||
62 | |||
diff --git a/test/sysutils/xz.exp b/test/sysutils/xz.exp new file mode 100755 index 000000000..11d0e560c --- /dev/null +++ b/test/sysutils/xz.exp | |||
@@ -0,0 +1,26 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "/usr/bin/xz -c /usr/bin/firejail > firejail_t1\r" | ||
11 | sleep 1 | ||
12 | |||
13 | send -- "firejail /usr/bin/xz -c /usr/bin/firejail > firejail_t2\r" | ||
14 | sleep 1 | ||
15 | |||
16 | send -- "diff -s firejail_t1 firejail_t2\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 1\n";exit} | ||
19 | "firejail_t1 and firejail_t2 are identical" | ||
20 | } | ||
21 | |||
22 | send -- "rm firejail_t*\r" | ||
23 | sleep 1 | ||
24 | |||
25 | |||
26 | puts "\nall done\n" | ||