diff options
Diffstat (limited to 'test/utils/utils.sh')
-rwxr-xr-x | test/utils/utils.sh | 19 |
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 | |||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | 7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) |
8 | export LC_ALL=C | 8 | export LC_ALL=C |
9 | 9 | ||
10 | if [ -f /etc/debian_version ]; then | 10 | if [[ -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" |
13 | fi | 13 | fi |
@@ -33,13 +33,12 @@ echo "TESTING: version (test/utils/version.exp)" | |||
33 | echo "TESTING: help (test/utils/help.exp)" | 33 | echo "TESTING: help (test/utils/help.exp)" |
34 | ./help.exp | 34 | ./help.exp |
35 | 35 | ||
36 | which man 2>/dev/null | 36 | if command -v man |
37 | if [ "$?" -eq 0 ]; | ||
38 | then | 37 | then |
39 | echo "TESTING: man (test/utils/man.exp)" | 38 | echo "TESTING: man (test/utils/man.exp)" |
40 | ./man.exp | 39 | ./man.exp |
41 | else | 40 | else |
42 | echo "TESTING SKIP: man not found" | 41 | echo "TESTING SKIP: man not found" |
43 | fi | 42 | fi |
44 | 43 | ||
45 | echo "TESTING: list (test/utils/list.exp)" | 44 | echo "TESTING: list (test/utils/list.exp)" |
@@ -48,12 +47,12 @@ echo "TESTING: list (test/utils/list.exp)" | |||
48 | echo "TESTING: tree (test/utils/tree.exp)" | 47 | echo "TESTING: tree (test/utils/tree.exp)" |
49 | ./tree.exp | 48 | ./tree.exp |
50 | 49 | ||
51 | if [ $(grep -c ^processor /proc/cpuinfo) -gt 1 ]; | 50 | if [[ $(grep -c ^processor /proc/cpuinfo) -gt 1 ]] |
52 | then | 51 | then |
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 |
55 | else | 54 | else |
56 | echo "TESTING SKIP: cpu.print, not enough CPUs" | 55 | echo "TESTING SKIP: cpu.print, not enough CPUs" |
57 | fi | 56 | fi |
58 | 57 | ||
59 | echo "TESTING: fs.print (test/utils/fs-print.exp)" | 58 | echo "TESTING: fs.print (test/utils/fs-print.exp)" |