Show More
@@ -21,12 +21,6 b' HGUSER="test"; export HGUSER' | |||
|
21 | 21 | |
|
22 | 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 | 24 | tests=0 |
|
31 | 25 | failed=0 |
|
32 | 26 | |
@@ -55,7 +49,7 b' fi' | |||
|
55 | 49 | |
|
56 | 50 | INST="$HGTMP/install" |
|
57 | 51 | cd .. |
|
58 |
if ${PYTHON |
|
|
52 | if ${PYTHON-python} setup.py install --home="$INST" > tests/install.err 2>&1 | |
|
59 | 53 | then |
|
60 | 54 | rm tests/install.err |
|
61 | 55 | mv "$INST/bin/hg" "$INST/bin/hg.real" |
@@ -123,35 +117,21 b' run_one() {' | |||
|
123 | 117 | return $fail |
|
124 | 118 | } |
|
125 | 119 | |
|
126 |
TESTS="$ |
|
|
120 | TESTS="$*" | |
|
127 | 121 | if [ -z "$TESTS" ] ; then |
|
128 |
TESTS=`ls test-* | grep - |
|
|
122 | TESTS=`ls test-* | grep -v "[.~]"` | |
|
129 | 123 | fi |
|
130 | 124 | |
|
131 | 125 | for f in $TESTS ; do |
|
132 | 126 | echo -n "." |
|
133 | if $use_arithmetic; then | |
|
134 | run_one $f || failed=$[$failed + 1] | |
|
135 | tests=$[$tests + 1] | |
|
136 | else | |
|
137 | run_one $f || failed=1 | |
|
138 | fi | |
|
127 | run_one $f || failed=`expr $failed + 1` | |
|
128 | tests=`expr $tests + 1` | |
|
139 | 129 | done |
|
140 | 130 | |
|
141 | if $use_arithmetic; then | |
|
142 | echo | |
|
143 | echo "Ran $tests tests, $failed failed." | |
|
131 | echo | |
|
132 | echo "Ran $tests tests, $failed failed." | |
|
144 | 133 | |
|
145 |
|
|
|
146 |
|
|
|
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 | |
|
134 | if [ $failed -gt 0 ] ; then | |
|
135 | cleanup_exit 1 | |
|
156 | 136 | fi |
|
157 | 137 | cleanup_exit 0 |
General Comments 0
You need to be logged in to leave comments.
Login now