# HG changeset patch # User Augie Fackler # Date 1412951692 14400 # Node ID ba5c635921e1a10bfc9a23b92585f06ea6a43133 # Parent 9f0f50c63e16fe9fbdff48b3f3bd0e56c5b69b2d 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. diff -r 9f0f50c63e16 -r ba5c635921e1 tests/test-run-tests.t --- a/tests/test-run-tests.t Thu Oct 09 17:00:29 2014 -0700 +++ b/tests/test-run-tests.t Fri Oct 10 10:34:52 2014 -0400 @@ -156,6 +156,27 @@ python hash seed: * (glob) [1] +Verify that when a process fails to start we show a useful message +================================================================== +NOTE: there is currently a bug where this shows "2 failed" even though +it's actually the same test being reported for failure twice. + + $ cat > test-serve-fail.t < $ echo 'abort: child process failed to start blah' + > EOF + $ $TESTDIR/run-tests.py --with-hg=`which hg` test-serve-fail.t + + ERROR: test-serve-fail.t output changed + ! + ERROR: test-serve-fail.t output changed + ! + Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob) + Failed test-serve-fail.t: output changed + # Ran 1 tests, 0 skipped, 0 warned, 2 failed. + python hash seed: * (glob) + [1] + $ rm test-serve-fail.t + Running In Debug Mode ======================