##// END OF EJS Templates
run-tests: remove resultslock since it serves no useful purpose...
Siddharth Agarwal -
r17920:4a417351 default
parent child Browse files
Show More
@@ -754,18 +754,13 b' def runone(options, test):'
754 True -> passed
754 True -> passed
755 False -> failed'''
755 False -> failed'''
756
756
757 global results, resultslock, iolock
757 global results, iolock
758
758
759 testpath = os.path.join(TESTDIR, test)
759 testpath = os.path.join(TESTDIR, test)
760
760
761 def result(l, e):
762 resultslock.acquire()
763 results[l].append(e)
764 resultslock.release()
765
766 def skip(msg):
761 def skip(msg):
767 if not options.verbose:
762 if not options.verbose:
768 result('s', (test, msg))
763 results['s'].append((test, msg))
769 else:
764 else:
770 iolock.acquire()
765 iolock.acquire()
771 print "\nSkipping %s: %s" % (testpath, msg)
766 print "\nSkipping %s: %s" % (testpath, msg)
@@ -788,15 +783,15 b' def runone(options, test):'
788 rename(testpath + ".err", testpath)
783 rename(testpath + ".err", testpath)
789 else:
784 else:
790 rename(testpath + ".err", testpath + ".out")
785 rename(testpath + ".err", testpath + ".out")
791 result('p', test)
786 success(test)
792 return
787 return
793 result('f', (test, msg))
788 results['f'].append((test, msg))
794
789
795 def success():
790 def success():
796 result('p', test)
791 results['p'].append(test)
797
792
798 def ignore(msg):
793 def ignore(msg):
799 result('i', (test, msg))
794 results['i'].append((test, msg))
800
795
801 if (os.path.basename(test).startswith("test-") and '~' not in test and
796 if (os.path.basename(test).startswith("test-") and '~' not in test and
802 ('.' not in test or test.endswith('.py') or
797 ('.' not in test or test.endswith('.py') or
@@ -1099,7 +1094,6 b' def runchildren(options, tests):'
1099 sys.exit(failures != 0)
1094 sys.exit(failures != 0)
1100
1095
1101 results = dict(p=[], f=[], s=[], i=[])
1096 results = dict(p=[], f=[], s=[], i=[])
1102 resultslock = threading.Lock()
1103 iolock = threading.Lock()
1097 iolock = threading.Lock()
1104
1098
1105 def runqueue(options, tests, results):
1099 def runqueue(options, tests, results):
General Comments 0
You need to be logged in to leave comments. Login now