mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1176028 - Use the jstest's task generator directly; r=sfink
--HG-- extra : rebase_source : ececc4e31a22a3e266698eb49d8e7747f84a3d3c
This commit is contained in:
parent
cad2b5be71
commit
13d32dff93
@ -368,11 +368,12 @@ def main():
|
||||
try:
|
||||
for t in skip_list:
|
||||
results.push(NullTestOutput(t))
|
||||
ok = run_all_tests(test_list, prefix, results, options)
|
||||
for out in run_all_tests(test_list, prefix, results, options):
|
||||
results.push(out)
|
||||
results.finish(True)
|
||||
except KeyboardInterrupt:
|
||||
ok = False
|
||||
results.finish(False)
|
||||
|
||||
results.finish(ok)
|
||||
return 0 if results.all_passed() else 1
|
||||
|
||||
return 0
|
||||
|
@ -182,7 +182,7 @@ def kill_undead(tasks, timeout):
|
||||
if timed_out(task, timeout):
|
||||
os.kill(task.pid, 9)
|
||||
|
||||
def run_all_tests_gen(tests, prefix, results, options):
|
||||
def run_all_tests(tests, prefix, results, options):
|
||||
# Copy and reverse for fast pop off end.
|
||||
tests = tests[:]
|
||||
tests.reverse()
|
||||
@ -203,12 +203,3 @@ def run_all_tests_gen(tests, prefix, results, options):
|
||||
# With Python3.4+ we could use yield from to remove this loop.
|
||||
for out in finished:
|
||||
yield out
|
||||
|
||||
return True
|
||||
|
||||
def run_all_tests(tests, prefix, results, options):
|
||||
for out in run_all_tests_gen(tests, prefix, results, options):
|
||||
results.push(out)
|
||||
results.pb.poke()
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ def _do_watch(qWatch, timeout):
|
||||
assert fin is TaskFinishedMarker, "invalid finish marker"
|
||||
|
||||
|
||||
def run_all_tests_gen(tests, prefix, results, options):
|
||||
def run_all_tests(tests, prefix, results, options):
|
||||
"""
|
||||
Uses scatter-gather to a thread-pool to manage children.
|
||||
"""
|
||||
@ -114,10 +114,3 @@ def run_all_tests_gen(tests, prefix, results, options):
|
||||
watcher.join()
|
||||
assert qTasks.empty(), "Send queue not drained"
|
||||
assert qResults.empty(), "Result queue not drained"
|
||||
|
||||
|
||||
def run_all_tests(tests, prefix, results, options):
|
||||
for result in run_all_tests_gen(tests, prefix, results, options):
|
||||
results.push(result)
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user