Skip to content
Snippets Groups Projects
Commit 4dd257d7 authored by Mike Pennisi's avatar Mike Pennisi
Browse files

Revert "Test runner: Avoid race condition"

This reverts commit 21781289.
parent ccf0adfc
No related branches found
No related tags found
No related merge requests found
...@@ -583,7 +583,6 @@ class TestSuite(object): ...@@ -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): ...@@ -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): ...@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment