diff options
author | Lars Hjemli <hjemli@gmail.com> | 2011-05-23 23:26:10 +0200 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2011-05-23 23:26:10 +0200 |
commit | 652a5a18db3b0409fedfaf8c5720446d87628ba0 (patch) | |
tree | cefa386058d968217af24374b93972820a9b43a8 /tests/setup.sh | |
parent | 4837fddc35bbd8d6f66a40486f75cdee3197172d (diff) | |
parent | ec79265f2053e6dc20e0ec486719f5954d2be83d (diff) | |
download | cgit-652a5a18db3b0409fedfaf8c5720446d87628ba0.tar.gz cgit-652a5a18db3b0409fedfaf8c5720446d87628ba0.tar.xz |
Merge branch 'stable'
Diffstat (limited to 'tests/setup.sh')
-rwxr-xr-x | tests/setup.sh | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/tests/setup.sh b/tests/setup.sh index 30f90d5..b2f1169 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -20,10 +20,10 @@ mkrepo() { name=$1 count=$2 dir=$PWD - test -d $name && return + test -d "$name" && return printf "Creating testrepo %s\n" $name - mkdir -p $name - cd $name + mkdir -p "$name" + cd "$name" git init n=1 while test $n -le $count @@ -50,6 +50,7 @@ setup_repos() mkrepo trash/repos/foo 5 >/dev/null mkrepo trash/repos/bar 50 >/dev/null mkrepo trash/repos/foo+bar 10 testplus >/dev/null + mkrepo "trash/repos/with space" 2 >/dev/null cat >trash/cgitrc <<EOF virtual-root=/ cache-root=$PWD/trash/cache @@ -75,6 +76,10 @@ repo.desc=the bar repo repo.url=foo+bar repo.path=$PWD/trash/repos/foo+bar/.git repo.desc=the foo+bar repo + +repo.url=with space +repo.path=$PWD/trash/repos/with space/.git +repo.desc=spaced repo EOF } @@ -101,6 +106,12 @@ tests_done() run_test() { + bug=0 + if test "$1" = "BUG" + then + bug=1 + shift + fi desc=$1 script=$2 test_count=$(expr $test_count + 1) @@ -109,9 +120,15 @@ run_test() eval "$2" >>test-output.log 2>>test-output.log res=$? printf "test %d: exitcode=%d\n" $test_count $res >>test-output.log - if test $res = 0 + if test $res = 0 -a $bug = 0 then printf " %2d) %-60s [ok]\n" $test_count "$desc" + elif test $res = 0 -a $bug = 1 + then + printf " %2d) %-60s [BUG FIXED]\n" $test_count "$desc" + elif test $bug = 1 + then + printf " %2d) %-60s [KNOWN BUG]\n" $test_count "$desc" else test_failed=$(expr $test_failed + 1) printf " %2d) %-60s [failed]\n" $test_count "$desc" |