##// END OF EJS Templates
Incorporated most of Aron Griffis suggestions for sh compatibility.
Thomas Arendsen Hein -
r804:19388dcb default
parent child Browse files
Show More
@@ -21,12 +21,6 b' HGUSER="test"; export HGUSER'
21
21
22 umask 022
22 umask 022
23
23
24 if [ "$[1+1]" = "2" ]; then
25 use_arithmetic=true
26 else
27 use_arithmetic=false
28 fi
29
30 tests=0
24 tests=0
31 failed=0
25 failed=0
32
26
@@ -55,7 +49,7 b' fi'
55
49
56 INST="$HGTMP/install"
50 INST="$HGTMP/install"
57 cd ..
51 cd ..
58 if ${PYTHON:-python} setup.py install --home="$INST" > tests/install.err 2>&1
52 if ${PYTHON-python} setup.py install --home="$INST" > tests/install.err 2>&1
59 then
53 then
60 rm tests/install.err
54 rm tests/install.err
61 mv "$INST/bin/hg" "$INST/bin/hg.real"
55 mv "$INST/bin/hg" "$INST/bin/hg.real"
@@ -123,35 +117,21 b' run_one() {'
123 return $fail
117 return $fail
124 }
118 }
125
119
126 TESTS="$@"
120 TESTS="$*"
127 if [ -z "$TESTS" ] ; then
121 if [ -z "$TESTS" ] ; then
128 TESTS=`ls test-* | grep -Ev "\.|~"`
122 TESTS=`ls test-* | grep -v "[.~]"`
129 fi
123 fi
130
124
131 for f in $TESTS ; do
125 for f in $TESTS ; do
132 echo -n "."
126 echo -n "."
133 if $use_arithmetic; then
127 run_one $f || failed=`expr $failed + 1`
134 run_one $f || failed=$[$failed + 1]
128 tests=`expr $tests + 1`
135 tests=$[$tests + 1]
136 else
137 run_one $f || failed=1
138 fi
139 done
129 done
140
130
141 if $use_arithmetic; then
131 echo
142 echo
132 echo "Ran $tests tests, $failed failed."
143 echo "Ran $tests tests, $failed failed."
144
133
145 if [ $failed -gt 0 ] ; then
134 if [ $failed -gt 0 ] ; then
146 cleanup_exit 1
135 cleanup_exit 1
147 fi
148 else
149 echo
150 if [ "$failed" = "1" ] ; then
151 echo "Ran tests, at least one failed."
152 cleanup_exit 1
153 else
154 echo "Ran tests, none failed."
155 fi
156 fi
136 fi
157 cleanup_exit 0
137 cleanup_exit 0
General Comments 0
You need to be logged in to leave comments. Login now