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.
--- 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 <<EOF
+ > $ 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
======================