diff --git a/js/src/tests/jstests.py b/js/src/tests/jstests.py index d002b1268b1b..58a2a138ca3b 100755 --- a/js/src/tests/jstests.py +++ b/js/src/tests/jstests.py @@ -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 diff --git a/js/src/tests/lib/tasks_unix.py b/js/src/tests/lib/tasks_unix.py index 4590f6775f20..ebffdf736b61 100644 --- a/js/src/tests/lib/tasks_unix.py +++ b/js/src/tests/lib/tasks_unix.py @@ -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() - - diff --git a/js/src/tests/lib/tasks_win.py b/js/src/tests/lib/tasks_win.py index b61b171c86e8..f53169aa069b 100644 --- a/js/src/tests/lib/tasks_win.py +++ b/js/src/tests/lib/tasks_win.py @@ -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 -