mirror of
https://git.zx2c4.com/cgit
synced 2024-12-22 23:21:52 +00:00
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>
This commit is contained in:
parent
bdd4a56ad5
commit
e4d2f2b042
@ -25,11 +25,13 @@ mkrepo() {
|
||||
mkdir -p $name
|
||||
cd $name
|
||||
git init
|
||||
for ((n=1; n<=count; n++))
|
||||
n=1
|
||||
while test $n -le $count
|
||||
do
|
||||
echo $n >file-$n
|
||||
git add file-$n
|
||||
git commit -m "commit $n"
|
||||
n=$(expr $n + 1)
|
||||
done
|
||||
if test "$3" = "testplus"
|
||||
then
|
||||
@ -101,7 +103,7 @@ run_test()
|
||||
{
|
||||
desc=$1
|
||||
script=$2
|
||||
((test_count++))
|
||||
test_count=$(expr $test_count + 1)
|
||||
printf "\ntest %d: name='%s'\n" $test_count "$desc" >>test-output.log
|
||||
printf "test %d: eval='%s'\n" $test_count "$2" >>test-output.log
|
||||
eval "$2" >>test-output.log 2>>test-output.log
|
||||
|
Loading…
Reference in New Issue
Block a user