changeset 22839:9f0f50c63e16

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')
author Kyle Lippincott <spectral@google.com>
date Thu, 09 Oct 2014 17:00:29 -0700
parents 9a20f53e436f
children ba5c635921e1
files tests/run-tests.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Thu Oct 09 15:10:40 2014 -0400
+++ b/tests/run-tests.py	Thu Oct 09 17:00:29 2014 -0700
@@ -1206,10 +1206,12 @@
             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: