diff options
Diffstat (limited to 'test/environment/environment.sh')
-rwxr-xr-x | test/environment/environment.sh | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/test/environment/environment.sh b/test/environment/environment.sh index da9c170b9..c88c91741 100755 --- a/test/environment/environment.sh +++ b/test/environment/environment.sh | |||
@@ -7,7 +7,6 @@ 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 | |||
11 | echo "TESTING: timeout (test/environment/timeout.exp)" | 10 | echo "TESTING: timeout (test/environment/timeout.exp)" |
12 | ./timeout.exp | 11 | ./timeout.exp |
13 | 12 | ||
@@ -39,13 +38,12 @@ echo "TESTING: environment variables (test/environment/env.exp)" | |||
39 | echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail-in-firejail.exp)" | 38 | echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail-in-firejail.exp)" |
40 | ./firejail-in-firejail.exp | 39 | ./firejail-in-firejail.exp |
41 | 40 | ||
42 | which aplay 2>/dev/null | 41 | if command -v aplay && [[ $(aplay -l | grep -c "List of PLAYBACK") -gt 0 ]] |
43 | if [ "$?" -eq 0 ] && [ "$(aplay -l | grep -c "List of PLAYBACK")" -gt 0 ]; | ||
44 | then | 42 | then |
45 | echo "TESTING: sound (test/environment/sound.exp)" | 43 | echo "TESTING: sound (test/environment/sound.exp)" |
46 | ./sound.exp | 44 | ./sound.exp |
47 | else | 45 | else |
48 | echo "TESTING SKIP: no aplay or sound card found" | 46 | echo "TESTING SKIP: no aplay or sound card found" |
49 | fi | 47 | fi |
50 | 48 | ||
51 | echo "TESTING: nice (test/environment/nice.exp)" | 49 | echo "TESTING: nice (test/environment/nice.exp)" |
@@ -54,26 +52,24 @@ echo "TESTING: nice (test/environment/nice.exp)" | |||
54 | echo "TESTING: quiet (test/environment/quiet.exp)" | 52 | echo "TESTING: quiet (test/environment/quiet.exp)" |
55 | ./quiet.exp | 53 | ./quiet.exp |
56 | 54 | ||
57 | which strace 2>/dev/null | 55 | if command -v strace |
58 | if [ "$?" -eq 0 ]; | ||
59 | then | 56 | then |
60 | echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" | 57 | echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" |
61 | ./allow-debuggers.exp | 58 | ./allow-debuggers.exp |
62 | else | 59 | else |
63 | echo "TESTING SKIP: strace not found" | 60 | echo "TESTING SKIP: strace not found" |
64 | fi | 61 | fi |
65 | 62 | ||
66 | # to install ibus: | 63 | # to install ibus: |
67 | # $ sudo apt-get install ibus-table-array30 | 64 | # $ sudo apt-get install ibus-table-array30 |
68 | # $ ibus-setup | 65 | # $ ibus-setup |
69 | 66 | ||
70 | find ~/.config/ibus/bus | grep unix-0 | 67 | if find ~/.config/ibus/bus | grep unix-0 |
71 | if [ "$?" -eq 0 ]; | ||
72 | then | 68 | then |
73 | echo "TESTING: ibus (test/environment/ibus.exp)" | 69 | echo "TESTING: ibus (test/environment/ibus.exp)" |
74 | ./ibus.exp | 70 | ./ibus.exp |
75 | else | 71 | else |
76 | echo "TESTING SKIP: ibus not configured" | 72 | echo "TESTING SKIP: ibus not configured" |
77 | fi | 73 | fi |
78 | 74 | ||
79 | echo "TESTING: rlimit (test/environment/rlimit.exp)" | 75 | echo "TESTING: rlimit (test/environment/rlimit.exp)" |