summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@canonical.com>2017-08-24 19:28:13 +0000
committerPaul Moore <paul@paul-moore.com>2017-09-12 18:11:53 -0400
commitb50312919d2c5f7fe9ecc526f783e8835aed1fc9 (patch)
tree78e57585b791310470d6bebfa07ed0f2612e1d4f
parent9b01871813cae608dcab455098b83488fa4cf65f (diff)
downloadlibseccomp-b50312919d2c5f7fe9ecc526f783e8835aed1fc9.tar.gz
tests: fix conditional that was skipping all basic python tests
A conditional added in ec6f45ab was incorrectly comparing the (empty) stdout of grep -q against 0, which always evaluated to be true and skipped the basic python tests. Fix it by using bash's pattern matching. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
-rwxr-xr-xtests/regression2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/regression b/tests/regression
index 10d41a4..1e799f7 100755
--- a/tests/regression
+++ b/tests/regression
@@ -608,7 +608,7 @@ function run_test_basic() {
local cmd
# if the test is a script, only run it in native/c mode
- if [[ $mode != "c" && $(echo "$2" | grep -q '.sh$') -eq 0 ]]; then
+ if [[ $mode != "c" && "$2" == *.sh ]]; then
print_result "$1" "SKIPPED" "(only valid in native/c mode)"
stats_skipped=$(($stats_skipped+1))
return