]> granicus.if.org Git - cgit/commitdiff
tests/setup.sh: allow testsuite to fail properly with POSIX standard shells
authorLars Hjemli <hjemli@gmail.com>
Sat, 6 Dec 2008 11:03:54 +0000 (12:03 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sat, 6 Dec 2008 11:03:54 +0000 (12:03 +0100)
The "((expr))" construct is not implemented by e.g. dash, so this commit
replaces the construct with a more portable one.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
tests/setup.sh

index 95acb542feb0644314427077bf137c3caeb5d8b9..30f90d5c39663166ad51e3c41995e255041420ee 100755 (executable)
@@ -113,7 +113,7 @@ run_test()
        then
                printf " %2d) %-60s [ok]\n" $test_count "$desc"
        else
-               ((test_failed++))
+               test_failed=$(expr $test_failed + 1)
                printf " %2d) %-60s [failed]\n" $test_count "$desc"
        fi
 }