Bug 638219 - Reuse cmd saved in results object rather than rebuilding it; r=terrence

--HG--
extra : rebase_source : 4b955e7793c966db184f67cc1a90ab8c24bbfcd7
This commit is contained in:
Dirkjan Ochtman 2013-02-15 17:44:24 +01:00
parent 07babddef9
commit 1fc0df4224

View File

@ -341,7 +341,7 @@ def run_tests_parallel(tests, shell_args, options):
result_process_return_queue = queue_manager.Queue()
result_process = Process(target=process_test_results_parallel,
args=(async_test_result_queue, result_process_return_queue,
notify_queue, len(tests), options, shell_args))
notify_queue, len(tests), options))
result_process.start()
# Ensure that a SIGTERM is handled the same way as SIGINT
@ -420,12 +420,12 @@ def get_parallel_results(async_test_result_queue, notify_queue):
yield async_test_result
def process_test_results_parallel(async_test_result_queue, return_queue, notify_queue, num_tests, options, shell_args):
def process_test_results_parallel(async_test_result_queue, return_queue, notify_queue, num_tests, options):
gen = get_parallel_results(async_test_result_queue, notify_queue)
ok = process_test_results(gen, num_tests, options, shell_args)
ok = process_test_results(gen, num_tests, options)
return_queue.put(ok)
def print_test_summary(failures, complete, doing, options, shell_args):
def print_test_summary(failures, complete, doing, options):
if failures:
if options.write_failures:
try:
@ -447,28 +447,28 @@ def print_test_summary(failures, complete, doing, options, shell_args):
traceback.print_exc()
sys.stderr.write('---\n')
def show_test(test):
def show_test(res):
if options.show_failed:
print(' ' + subprocess.list2cmdline(test.command(options.js_shell, shell_args)))
print(' ' + subprocess.list2cmdline(res.cmd))
else:
print(' ' + ' '.join(test.jitflags + [test.path]))
print(' ' + ' '.join(res.test.jitflags + [res.test.path]))
print('FAILURES:')
for res in failures:
if not res.timed_out:
show_test(res.test)
show_test(res)
print('TIMEOUTS:')
for res in failures:
if res.timed_out:
show_test(res.test)
show_test(res)
return False
else:
print('PASSED ALL' + ('' if complete else ' (partial run -- interrupted by user %s)' % doing))
return True
def process_test_results(results, num_tests, options, shell_args):
def process_test_results(results, num_tests, options):
pb = NullProgressBar()
if not options.hide_progress and not options.show_cmd and ProgressBar.conservative_isatty():
fmt = [
@ -518,7 +518,7 @@ def process_test_results(results, num_tests, options, shell_args):
print_tinderbox("TEST-UNEXPECTED-FAIL", None, "Test execution interrupted by user");
pb.finish(True)
return print_test_summary(failures, complete, doing, options, shell_args)
return print_test_summary(failures, complete, doing, options)
def get_serial_results(tests, shell_args, options):
@ -527,7 +527,7 @@ def get_serial_results(tests, shell_args, options):
def run_tests(tests, shell_args, options):
gen = get_serial_results(tests, shell_args, options)
ok = process_test_results(gen, len(tests), options, shell_args)
ok = process_test_results(gen, len(tests), options)
return ok
def parse_jitflags(options):