msysGit: move scripts to /share/msysGit/
[msysgit.git] / share / msysGit / run-tests.sh
blob142494b7348115d38cb3cf0a60d9b3ad10335f74
1 #!/bin/sh
3 start_test="$1"
5 cd /git/t
7 : > /tmp/failed-tests.out
9 for test in t[0-9]*.sh
11 case $test in
12 $start_test*) start_test=;;
13 *) continue;;
14 esac
16 printf '%70s ' $test
17 if sh -x $test --no-symlinks -v > /tmp/test.out 2>&1
18 then
19 echo -e '\033[32mok\033[0m'
20 else
21 echo "*** $test" >> /tmp/failed-tests.out
22 cat /tmp/test.out >> /tmp/failed-tests.out
23 echo -e '\033[31mfailed\033[0m'
25 done
27 test -s /tmp/failed-tests.out &&
28 echo "Do you want to see the output?" &&
29 read answer &&
30 case answer in y*|Y*)
31 less /tmp/tests.out
32 esac