run-tests: remove MSVC-leftovers which would make the tests fail
[msysgit.git] / share / msysGit / run-tests.sh
blob9289b7d7e43cef2cd6cbf4d13eb8559b5f6f72a0
1 #!/bin/sh
3 # This list was generated after a run of "make test" using generate_skip_list
5 export GIT_SKIP_TESTS='
8 #echo "$GIT_SKIP_TESTS" | tr '\n' ' '; exit
9 export NO_SVN_TESTS=t
10 case " $*" in
11 *' -j'*) ;;
12 *) PARALLEL_MAKE=-j5;;
13 esac
15 generate_skip_list () {
16 cd /git/t
17 for d in trash*
19 name=${d#trash directory.}
20 short=${name%%-*}
21 sh $name.sh |
22 sed -n -e "s/.*FAIL \([0-9]*\).*/$short.\1/p" \
23 -e "s/^not ok - \([0-9]*\).*/$short.\1/p"
24 done
27 test generate_skip_list = "$1" && {
28 generate_skip_list
29 exit
32 get_test_name () {
33 echo "$*" | sed 's/.* \(t[0-9].*\)\.sh .*/\1/'
36 get_finished_tests () {
37 REMAINING_TESTS=
38 for t in $CURRENT_TESTS
40 f=$(grep failed t/test-results/${t%.sh}-[1-9]* 2> /dev/null)
41 if test ! -z "$f"
42 then
43 printf '%70s ' $(cd t && echo $t*.sh)
44 if test "failed 0" = "$f"
45 then
46 echo -e '\033[32mok\033[0m'
47 else
48 FAILED_TESTS="$FAILED_TESTS $t"
49 echo -e '\033[31mfailed\033[0m'
51 else
52 REMAINING_TESTS="$REMAINING_TESTS $t"
54 done
55 CURRENT_TESTS="$REMAINING_TESTS"
58 cd /git &&
59 for file in *.exe
61 dir=${file%.exe} &&
62 test ! -d "$dir" ||
63 rm -rf "$dir"
64 done &&
65 echo make $PARALLEL_MAKE &&
66 (cd t &&
67 rm -rf test-results &&
68 time make $PARALLEL_MAKE -k "$@" < /dev/null) 2>&1 |
70 CURRENT_TESTS=
71 FAILED_TESTS=
72 while read line
74 case "$line" in
75 "*** t"*)
76 TEST_NAME=$(get_test_name "$line")
77 CURRENT_TESTS="$CURRENT_TESTS $TEST_NAME"
78 printf "Currently running $(echo "$CURRENT_TESTS" |
79 sed 's/-[^ ]*//g')\\r"
81 '* passed'*|'# passed'*)
82 get_finished_tests
84 esac
85 done
86 test -z "$FAILED_TESTS" || echo "These tests failed: $FAILED_TESTS"
87 test -z "$CURRENT_TESTS" || echo "Unfinished tests: $CURRENT_TESTS")