comparison tests/run-tests.py @ 32907:bd77ac2bd23a

run-tests: explicitly flush test runner output for Windows stability When hghave testing goes awry, the output order was changing on Windows. diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -920,10 +920,10 @@ > EOF > done $ rt -j 2 - .... + ....skipped: unknown feature: notarealhghavefeature\r (esc) + + # Ran 5 tests, 0 skipped, 0 warned, 0 failed. - skipped: unknown feature: notarealhghavefeature - $ cd .. $ rm -rf broken Since 'skipped: unknown feature: notarealhghavefeature\n\n' is printed to stdout and the rest to stderr, it seems like maybe stdio isn't line buffered on Windows. When a program exits, stdout is flushed before stderr[1]. [1] https://blogs.msdn.microsoft.com/oldnewthing/20060519-09/?p=31133
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 18 Jun 2017 22:19:54 -0400
parents 3139a7a1e7d4
children 240183a04429
comparison
equal deleted inserted replaced
32906:23b07333a8b2 32907:bd77ac2bd23a
2008 if failed: 2008 if failed:
2009 self.stream.writeln('python hash seed: %s' % 2009 self.stream.writeln('python hash seed: %s' %
2010 os.environ['PYTHONHASHSEED']) 2010 os.environ['PYTHONHASHSEED'])
2011 if self._runner.options.time: 2011 if self._runner.options.time:
2012 self.printtimes(result.times) 2012 self.printtimes(result.times)
2013 self.stream.flush()
2013 2014
2014 return result 2015 return result
2015 2016
2016 def printtimes(self, times): 2017 def printtimes(self, times):
2017 # iolock held by run 2018 # iolock held by run