comparison tests/run-tests.py @ 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 5f8f8225fc7e
comparison
equal deleted inserted replaced
22838:9a20f53e436f 22839:9f0f50c63e16
1204 pass 1204 pass
1205 elif self._options.view: 1205 elif self._options.view:
1206 os.system("%s %s %s" % 1206 os.system("%s %s %s" %
1207 (self._options.view, test.refpath, test.errpath)) 1207 (self._options.view, test.refpath, test.errpath))
1208 else: 1208 else:
1209 failed, lines = getdiff(expected, got, 1209 servefail, lines = getdiff(expected, got,
1210 test.refpath, test.errpath) 1210 test.refpath, test.errpath)
1211 if failed: 1211 if servefail:
1212 self.addFailure(test, 'diff generation failed') 1212 self.addFailure(
1213 test,
1214 'server failed to start (HGPORT=%s)' % test._startport)
1213 else: 1215 else:
1214 self.stream.write('\n') 1216 self.stream.write('\n')
1215 for line in lines: 1217 for line in lines:
1216 self.stream.write(line) 1218 self.stream.write(line)
1217 self.stream.flush() 1219 self.stream.flush()