##// END OF EJS Templates
run-tests: add a lock for console I/O
Matt Mackall -
r14002:a738c30d default
parent child Browse files
Show More
@@ -654,7 +654,7 b' def runone(options, test):'
654 654 True -> passed
655 655 False -> failed'''
656 656
657 global results, resultslock
657 global results, resultslock, iolock
658 658
659 659 testpath = os.path.join(TESTDIR, test)
660 660
@@ -825,18 +825,22 b' def runone(options, test):'
825 825 else:
826 826 fail("output changed", ret)
827 827 if ret != 'timeout' and not options.nodiff:
828 iolock.acquire()
828 829 if options.view:
829 830 os.system("%s %s %s" % (options.view, ref, err))
830 831 else:
831 832 showdiff(refout, out, ref, err)
833 iolock.release()
832 834 ret = 1
833 835 elif ret:
834 836 mark = '!'
835 837 fail("returned error code %d" % ret, ret)
836 838
837 839 if not options.verbose:
840 iolock.acquire()
838 841 sys.stdout.write(mark)
839 842 sys.stdout.flush()
843 iolock.release()
840 844
841 845 killdaemons()
842 846
@@ -954,6 +958,7 b' def runchildren(options, tests):'
954 958
955 959 results = dict(p=[], f=[], s=[], i=[])
956 960 resultslock = threading.Lock()
961 iolock = threading.Lock()
957 962
958 963 def runqueue(options, tests, results):
959 964 for test in tests:
General Comments 0
You need to be logged in to leave comments. Login now