aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/utils.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/utils.sh')
-rwxr-xr-xtest/utils/utils.sh19
1 files changed, 9 insertions, 10 deletions
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index 102c8df17..647cbfb34 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -7,7 +7,7 @@ export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) 7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8export LC_ALL=C 8export LC_ALL=C
9 9
10if [ -f /etc/debian_version ]; then 10if [[ -f /etc/debian_version ]]; then
11 libdir=$(dirname "$(dpkg -L firejail | grep fcopy)") 11 libdir=$(dirname "$(dpkg -L firejail | grep fcopy)")
12 export PATH="$PATH:$libdir" 12 export PATH="$PATH:$libdir"
13fi 13fi
@@ -33,13 +33,12 @@ echo "TESTING: version (test/utils/version.exp)"
33echo "TESTING: help (test/utils/help.exp)" 33echo "TESTING: help (test/utils/help.exp)"
34./help.exp 34./help.exp
35 35
36which man 2>/dev/null 36if command -v man
37if [ "$?" -eq 0 ];
38then 37then
39 echo "TESTING: man (test/utils/man.exp)" 38 echo "TESTING: man (test/utils/man.exp)"
40 ./man.exp 39 ./man.exp
41else 40else
42 echo "TESTING SKIP: man not found" 41 echo "TESTING SKIP: man not found"
43fi 42fi
44 43
45echo "TESTING: list (test/utils/list.exp)" 44echo "TESTING: list (test/utils/list.exp)"
@@ -48,12 +47,12 @@ echo "TESTING: list (test/utils/list.exp)"
48echo "TESTING: tree (test/utils/tree.exp)" 47echo "TESTING: tree (test/utils/tree.exp)"
49./tree.exp 48./tree.exp
50 49
51if [ $(grep -c ^processor /proc/cpuinfo) -gt 1 ]; 50if [[ $(grep -c ^processor /proc/cpuinfo) -gt 1 ]]
52then 51then
53 echo "TESTING: cpu.print (test/utils/cpu-print.exp)" 52 echo "TESTING: cpu.print (test/utils/cpu-print.exp)"
54 ./cpu-print.exp 53 ./cpu-print.exp
55else 54else
56 echo "TESTING SKIP: cpu.print, not enough CPUs" 55 echo "TESTING SKIP: cpu.print, not enough CPUs"
57fi 56fi
58 57
59echo "TESTING: fs.print (test/utils/fs-print.exp)" 58echo "TESTING: fs.print (test/utils/fs-print.exp)"