# HG changeset patch # User Kyle Lippincott # Date 2014-10-10 00:00:29 # Node ID 9f0f50c63e16fe9fbdff48b3f3bd0e56c5b69b2d # Parent 9a20f53e436f42c2704b609b2f6ae1ee23ff0a0e run-tests: more accurate/helpful message than "diff generation failed" Diff generation didn't really fail, it recognized that an hg serve server has failed to start, and thus skipped the diff generation intentionally. The most common reason for a server to fail to start is that the port was already in use, so output HGPORT as well, to help finding it (since pgrep -f 'hg serve' is not sufficient, if the command line is something like 'hg -R main serve') diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1206,10 +1206,12 @@ class TestResult(unittest._TextTestResul os.system("%s %s %s" % (self._options.view, test.refpath, test.errpath)) else: - failed, lines = getdiff(expected, got, - test.refpath, test.errpath) - if failed: - self.addFailure(test, 'diff generation failed') + servefail, lines = getdiff(expected, got, + test.refpath, test.errpath) + if servefail: + self.addFailure( + test, + 'server failed to start (HGPORT=%s)' % test._startport) else: self.stream.write('\n') for line in lines: