# HG changeset patch # User Matt Mackall # Date 1352938119 21600 # Node ID d5d13134793af5567cb118f3b5619aa056ce885e # Parent ce884838a9558b646721366ad75dcb2b02dbf39f run-tests: backout 4a4173519b63 This deleted work in progress to eliminate child processes for -j. [ original upstream message ] diff -r ce884838a955 -r d5d13134793a tests/run-tests.py --- a/tests/run-tests.py Thu Nov 08 14:10:04 2012 -0800 +++ b/tests/run-tests.py Wed Nov 14 18:08:39 2012 -0600 @@ -768,13 +768,18 @@ True -> passed False -> failed''' - global results, iolock + global results, resultslock, iolock testpath = os.path.join(TESTDIR, test) + def result(l, e): + resultslock.acquire() + results[l].append(e) + resultslock.release() + def skip(msg): if not options.verbose: - results['s'].append((test, msg)) + result('s', (test, msg)) else: iolock.acquire() print "\nSkipping %s: %s" % (testpath, msg) @@ -797,15 +802,15 @@ rename(testpath + ".err", testpath) else: rename(testpath + ".err", testpath + ".out") - success(test) + result('p', test) return - results['f'].append((test, msg)) + result('f', (test, msg)) def success(): - results['p'].append(test) + result('p', test) def ignore(msg): - results['i'].append((test, msg)) + result('i', (test, msg)) if (os.path.basename(test).startswith("test-") and '~' not in test and ('.' not in test or test.endswith('.py') or @@ -1118,6 +1123,7 @@ sys.exit(failures != 0) results = dict(p=[], f=[], s=[], i=[]) +resultslock = threading.Lock() times = [] iolock = threading.Lock()