comparison tests/run-tests.py @ 36438:93228b2a1fc0

run-tests: don't mask errors when a server fails to start There are sporadic instances of this on Windows. They seem to happen more frequently after the test machine is rebooted, although the only way to hit it on my laptop is to loop certain tests with -j9 for hours. The problem with masking out the specific failure is that there's no way to know if it's the same line in the test that's failing, or if it is random. The justification for adding this masking in 52e9e63f1495 was that the failures occur regularly, but that's not the case anymore. The port number is still printed, in case that turns out to be useful.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 25 Feb 2018 21:04:12 -0500
parents 8de90e006c78
children 51a9f0246931
comparison
equal deleted inserted replaced
36437:745b0df08514 36438:93228b2a1fc0
1761 (v, test.refpath, test.errpath)) 1761 (v, test.refpath, test.errpath))
1762 else: 1762 else:
1763 servefail, lines = getdiff(expected, got, 1763 servefail, lines = getdiff(expected, got,
1764 test.refpath, test.errpath) 1764 test.refpath, test.errpath)
1765 if servefail: 1765 if servefail:
1766 raise test.failureException( 1766 self.stream.write(
1767 'server failed to start (HGPORT=%s)' % test._startport) 1767 'server failed to start (HGPORT=%s)' % test._startport)
1768 else: 1768
1769 self.stream.write('\n') 1769 self.stream.write('\n')
1770 for line in lines: 1770 for line in lines:
1771 line = highlightdiff(line, self.color) 1771 line = highlightdiff(line, self.color)
1772 if PYTHON3: 1772 if PYTHON3:
1773 self.stream.flush() 1773 self.stream.flush()
1774 self.stream.buffer.write(line) 1774 self.stream.buffer.write(line)
1775 self.stream.buffer.flush() 1775 self.stream.buffer.flush()
1776 else: 1776 else:
1777 self.stream.write(line) 1777 self.stream.write(line)
1778 self.stream.flush() 1778 self.stream.flush()
1779 1779
1780 # handle interactive prompt without releasing iolock 1780 # handle interactive prompt without releasing iolock
1781 if self._options.interactive: 1781 if self._options.interactive:
1782 if test.readrefout() != expected: 1782 if test.readrefout() != expected:
1783 self.stream.write( 1783 self.stream.write(