changeset 14003:ba734ff5cadd

run-tests: fix some missing i/o locks
author Matt Mackall <mpm@selenic.com>
date Sun, 24 Apr 2011 17:52:46 -0500
parents a738c30d4b18
children 97ed99d1f419
files tests/run-tests.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Apr 24 16:46:37 2011 -0500
+++ b/tests/run-tests.py	Sun Apr 24 17:52:46 2011 -0500
@@ -667,16 +667,22 @@
         if not options.verbose:
             result('s', (test, msg))
         else:
+            iolock.acquire()
             print "\nSkipping %s: %s" % (testpath, msg)
+            iolock.release()
         return None
 
     def fail(msg, ret):
         if not options.nodiff:
+            iolock.acquire()
             print "\nERROR: %s %s" % (testpath, msg)
+            iolock.release()
         if (not ret and options.interactive
             and os.path.exists(testpath + ".err")):
+            iolock.acquire()
             print "Accept this change? [n] ",
             answer = sys.stdin.readline().strip()
+            iolock.release()
             if answer.lower() in "y yes".split():
                 if test.endswith(".t"):
                     rename(testpath + ".err", testpath)