Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix run-tests.sh and teach it to run only a certain number of tests
Browse files Browse the repository at this point in the history
There was a bug preventing the final "see output?" from working.

While at it, I introduced a "-<n>" function so that you can run
exactly one test by

	/share/msysGit/run-tests.sh -1 t5510

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 4, 2007
1 parent 094bc1b commit 9a686a5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions share/msysGit/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/sh

case "$1" in
-*)
COUNT=$(echo "$1" | sed "s/-//")
shift
;;
*)
COUNT=9999
;;
esac

start_test="$1"

cd /git/t
Expand All @@ -22,12 +32,14 @@ do
cat /tmp/test.out >> /tmp/failed-tests.out
echo -e '\033[31mfailed\033[0m'
fi
COUNT=$(($COUNT-1))
test $COUNT -gt 0 || break
done

test -s /tmp/failed-tests.out &&
echo "Do you want to see the output?" &&
read answer &&
case answer in y*|Y*)
less /tmp/tests.out
case $answer in y*|Y*|j*|J*)
less /tmp/failed-tests.out
esac

0 comments on commit 9a686a5

Please sign in to comment.