author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2008-11-04 19:23:41 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-11-06 18:18:09 (UTC) |
commit | e4d2f2b042100182ff5b214fd6848b71d70fad7d (patch) (unidiff) | |
tree | bb5bfcf6e5f71a478e7586bd1d128aa94bfd7dbe | |
parent | bdd4a56ad55720cde3b7b290b6b9fe4c57dc4f01 (diff) | |
download | cgit-e4d2f2b042100182ff5b214fd6848b71d70fad7d.zip cgit-e4d2f2b042100182ff5b214fd6848b71d70fad7d.tar.gz cgit-e4d2f2b042100182ff5b214fd6848b71d70fad7d.tar.bz2 |
Fix tests to work on Ubuntu (dash)
The system shell (/bin/sh) on Ubuntu is dash, which aims to be a
POSIX standard shell. In particular, dash does not implement any
of the common extensions to the standard that, say, bash and ksh
do.
Replace some non-POSIX constructs in setup.sh with more portable
and mundane code.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rwxr-xr-x | tests/setup.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/setup.sh b/tests/setup.sh index 1457dd5..95acb54 100755 --- a/tests/setup.sh +++ b/tests/setup.sh | |||
@@ -27,3 +27,4 @@ mkrepo() { | |||
27 | git init | 27 | git init |
28 | for ((n=1; n<=count; n++)) | 28 | n=1 |
29 | while test $n -le $count | ||
29 | do | 30 | do |
@@ -32,2 +33,3 @@ mkrepo() { | |||
32 | git commit -m "commit $n" | 33 | git commit -m "commit $n" |
34 | n=$(expr $n + 1) | ||
33 | done | 35 | done |
@@ -103,3 +105,3 @@ run_test() | |||
103 | script=$2 | 105 | script=$2 |
104 | ((test_count++)) | 106 | test_count=$(expr $test_count + 1) |
105 | printf "\ntest %d: name='%s'\n" $test_count "$desc" >>test-output.log | 107 | printf "\ntest %d: name='%s'\n" $test_count "$desc" >>test-output.log |