##// END OF EJS Templates
run-tests: backout 4a4173519b63...
Matt Mackall -
r17936:95fc4ab3 default
parent child Browse files
Show More
@@ -768,13 +768,18 b' def runone(options, test):'
768 True -> passed
768 True -> passed
769 False -> failed'''
769 False -> failed'''
770
770
771 global results, iolock
771 global results, resultslock, iolock
772
772
773 testpath = os.path.join(TESTDIR, test)
773 testpath = os.path.join(TESTDIR, test)
774
774
775 def result(l, e):
776 resultslock.acquire()
777 results[l].append(e)
778 resultslock.release()
779
775 def skip(msg):
780 def skip(msg):
776 if not options.verbose:
781 if not options.verbose:
777 results['s'].append((test, msg))
782 result('s', (test, msg))
778 else:
783 else:
779 iolock.acquire()
784 iolock.acquire()
780 print "\nSkipping %s: %s" % (testpath, msg)
785 print "\nSkipping %s: %s" % (testpath, msg)
@@ -797,15 +802,15 b' def runone(options, test):'
797 rename(testpath + ".err", testpath)
802 rename(testpath + ".err", testpath)
798 else:
803 else:
799 rename(testpath + ".err", testpath + ".out")
804 rename(testpath + ".err", testpath + ".out")
800 success(test)
805 result('p', test)
801 return
806 return
802 results['f'].append((test, msg))
807 result('f', (test, msg))
803
808
804 def success():
809 def success():
805 results['p'].append(test)
810 result('p', test)
806
811
807 def ignore(msg):
812 def ignore(msg):
808 results['i'].append((test, msg))
813 result('i', (test, msg))
809
814
810 if (os.path.basename(test).startswith("test-") and '~' not in test and
815 if (os.path.basename(test).startswith("test-") and '~' not in test and
811 ('.' not in test or test.endswith('.py') or
816 ('.' not in test or test.endswith('.py') or
@@ -1118,6 +1123,7 b' def runchildren(options, tests):'
1118 sys.exit(failures != 0)
1123 sys.exit(failures != 0)
1119
1124
1120 results = dict(p=[], f=[], s=[], i=[])
1125 results = dict(p=[], f=[], s=[], i=[])
1126 resultslock = threading.Lock()
1121 times = []
1127 times = []
1122 iolock = threading.Lock()
1128 iolock = threading.Lock()
1123
1129
General Comments 0
You need to be logged in to leave comments. Login now