run-tests: add iolock to failure output
authorMatt Mackall <mpm@selenic.com>
Mon, 04 Aug 2014 14:42:24 -0500
changeset 21993 284a8c9f74f3
parent 21992 6be1e1dbe6a0
child 21994 c6e1f2c6d5f1
run-tests: add iolock to failure output
tests/run-tests.py
--- a/tests/run-tests.py	Mon Aug 04 14:32:34 2014 -0500
+++ b/tests/run-tests.py	Mon Aug 04 14:42:24 2014 -0500
@@ -1085,10 +1085,12 @@
         if self._options.first:
             self.stop()
         else:
+            iolock.acquire()
             if not self._options.nodiff:
                 self.stream.write('\nERROR: %s output changed\n' % test)
 
             self.stream.write('!')
+            iolock.release()
 
     def addError(self, *args, **kwargs):
         super(TestResult, self).addError(*args, **kwargs)