comparison tests/test-run-tests.t @ 22840:ba5c635921e1

test-run-tests: add a test for detection of failure to start a server This also highlights a bug: right now we print "2 failed" but we only ran one test.
author Augie Fackler <raf@durin42.com>
date Fri, 10 Oct 2014 10:34:52 -0400
parents 9a20f53e436f
children 5459b30aa498
comparison
equal deleted inserted replaced
22839:9f0f50c63e16 22840:ba5c635921e1
153 ! 153 !
154 Failed test-failure.t: output changed 154 Failed test-failure.t: output changed
155 # Ran 2 tests, 1 skipped, 0 warned, 1 failed. 155 # Ran 2 tests, 1 skipped, 0 warned, 1 failed.
156 python hash seed: * (glob) 156 python hash seed: * (glob)
157 [1] 157 [1]
158
159 Verify that when a process fails to start we show a useful message
160 ==================================================================
161 NOTE: there is currently a bug where this shows "2 failed" even though
162 it's actually the same test being reported for failure twice.
163
164 $ cat > test-serve-fail.t <<EOF
165 > $ echo 'abort: child process failed to start blah'
166 > EOF
167 $ $TESTDIR/run-tests.py --with-hg=`which hg` test-serve-fail.t
168
169 ERROR: test-serve-fail.t output changed
170 !
171 ERROR: test-serve-fail.t output changed
172 !
173 Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob)
174 Failed test-serve-fail.t: output changed
175 # Ran 1 tests, 0 skipped, 0 warned, 2 failed.
176 python hash seed: * (glob)
177 [1]
178 $ rm test-serve-fail.t
158 179
159 Running In Debug Mode 180 Running In Debug Mode
160 ====================== 181 ======================
161 182
162 $ $TESTDIR/run-tests.py --with-hg=`which hg` --debug 2>&1 | grep -v pwd 183 $ $TESTDIR/run-tests.py --with-hg=`which hg` --debug 2>&1 | grep -v pwd