author | Lars Hjemli <hjemli@gmail.com> | 2008-12-06 11:03:54 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-12-06 11:03:54 (UTC) |
commit | b6faa78091a1340b73e291f1f87604f246d3f391 (patch) (unidiff) | |
tree | b6a7d2ee0fd9bc8ab2c6346dd30a49244f401e1c /tests | |
parent | 2755af6e29801ea10b5d7be6a0a5635ba3bc9660 (diff) | |
download | cgit-b6faa78091a1340b73e291f1f87604f246d3f391.zip cgit-b6faa78091a1340b73e291f1f87604f246d3f391.tar.gz cgit-b6faa78091a1340b73e291f1f87604f246d3f391.tar.bz2 |
tests/setup.sh: allow testsuite to fail properly with POSIX standard shells
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>
-rwxr-xr-x | tests/setup.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/setup.sh b/tests/setup.sh index 95acb54..30f90d5 100755 --- a/tests/setup.sh +++ b/tests/setup.sh | |||
@@ -110,13 +110,13 @@ run_test() | |||
110 | res=$? | 110 | res=$? |
111 | printf "test %d: exitcode=%d\n" $test_count $res >>test-output.log | 111 | printf "test %d: exitcode=%d\n" $test_count $res >>test-output.log |
112 | if test $res = 0 | 112 | if test $res = 0 |
113 | then | 113 | then |
114 | printf " %2d) %-60s [ok]\n" $test_count "$desc" | 114 | printf " %2d) %-60s [ok]\n" $test_count "$desc" |
115 | else | 115 | else |
116 | ((test_failed++)) | 116 | test_failed=$(expr $test_failed + 1) |
117 | printf " %2d) %-60s [failed]\n" $test_count "$desc" | 117 | printf " %2d) %-60s [failed]\n" $test_count "$desc" |
118 | fi | 118 | fi |
119 | } | 119 | } |
120 | 120 | ||
121 | cgit_query() | 121 | cgit_query() |
122 | { | 122 | { |