mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 07:25:15 +02:00
Revert "Test runner: Avoid race condition"
This reverts commit 217812891cd63c20b25379b2cf73f3101416ffe4.
This commit is contained in:
parent
ccf0adfc62
commit
4dd257d7e6
@ -583,7 +583,6 @@ class TestSuite(object):
|
|||||||
SkipCaseElement.append(SkipElement)
|
SkipCaseElement.append(SkipElement)
|
||||||
TestSuiteElement.append(SkipCaseElement)
|
TestSuiteElement.append(SkipCaseElement)
|
||||||
|
|
||||||
threads = []
|
|
||||||
if workers_count > 1:
|
if workers_count > 1:
|
||||||
pool_sem = threading.Semaphore(workers_count)
|
pool_sem = threading.Semaphore(workers_count)
|
||||||
log_lock = threading.Lock()
|
log_lock = threading.Lock()
|
||||||
@ -614,13 +613,11 @@ class TestSuite(object):
|
|||||||
exec_case()
|
exec_case()
|
||||||
else:
|
else:
|
||||||
pool_sem.acquire()
|
pool_sem.acquire()
|
||||||
thread = threading.Thread(target=exec_case)
|
threading.Thread(target=exec_case).start()
|
||||||
threads.append(thread)
|
|
||||||
thread.start()
|
|
||||||
pool_sem.release()
|
pool_sem.release()
|
||||||
|
|
||||||
for thread in threads:
|
if workers_count > 1:
|
||||||
thread.join()
|
log_lock.acquire()
|
||||||
|
|
||||||
if print_summary:
|
if print_summary:
|
||||||
self.PrintSummary(progress, logname)
|
self.PrintSummary(progress, logname)
|
||||||
@ -631,6 +628,9 @@ class TestSuite(object):
|
|||||||
print "Use --full-summary to see output from failed tests"
|
print "Use --full-summary to see output from failed tests"
|
||||||
print
|
print
|
||||||
|
|
||||||
|
if workers_count > 1:
|
||||||
|
log_lock.release()
|
||||||
|
|
||||||
return progress.failed
|
return progress.failed
|
||||||
|
|
||||||
def WriteLog(self, result):
|
def WriteLog(self, result):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user