From 9a686a5089bae9750463a88ff4f1724255cb764c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 3 Sep 2007 19:59:54 +0100 Subject: [PATCH] Fix run-tests.sh and teach it to run only a certain number of tests There was a bug preventing the final "see output?" from working. While at it, I introduced a "-" function so that you can run exactly one test by /share/msysGit/run-tests.sh -1 t5510 Signed-off-by: Johannes Schindelin --- share/msysGit/run-tests.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/share/msysGit/run-tests.sh b/share/msysGit/run-tests.sh index 142494b7..8b50cada 100644 --- a/share/msysGit/run-tests.sh +++ b/share/msysGit/run-tests.sh @@ -1,5 +1,15 @@ #!/bin/sh +case "$1" in +-*) + COUNT=$(echo "$1" | sed "s/-//") + shift +;; +*) + COUNT=9999 +;; +esac + start_test="$1" cd /git/t @@ -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 -- 2.11.4.GIT