Bug 829787 - Fix a failure with jit-test --show-failed-cmd option. r=jorendorff, DONTBUILD
authorChristian Holler <choller@mozilla.com>
Fri, 11 Jan 2013 23:48:12 +0100
changeset 129312 5e82debfd1ebe49be1f585d0bf4ef3d4b67e9062
parent 129311 c4db97d21a09e5fc32e483aefc17ae4fb8379e8c
child 129313 bf513a2a4a7889a6c6872bc76a9f1a519abca6b2
push id317
push userbbajaj@mozilla.com
push dateTue, 07 May 2013 01:20:33 +0000
treeherdermozilla-release@159a10910249 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff, DONTBUILD
bugs829787
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 829787 - Fix a failure with jit-test --show-failed-cmd option. r=jorendorff, DONTBUILD
js/src/jit-test/jit_test.py
--- a/js/src/jit-test/jit_test.py
+++ b/js/src/jit-test/jit_test.py
@@ -343,17 +343,19 @@ def run_tests_parallel(tests, test_dir, 
     # that it has received a result and we can start a new process
     # on our end. The advantage is that we don't have to sleep and
     # check for worker completion ourselves regularly.
     notify_queue = queue_manager.Queue()
 
     # This queue will contain the return value of the function
     # processing the test results.
     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, JS))
+    result_process = Process(target=process_test_results_parallel,
+                             args=(async_test_result_queue, result_process_return_queue,
+                                   notify_queue, len(tests), OPTIONS, JS, lib_dir, shell_args))
     result_process.start()
 
     # Ensure that a SIGTERM is handled the same way as SIGINT
     # to terminate all child processes.
     sigint_handler = signal.getsignal(signal.SIGINT)
     signal.signal(signal.SIGTERM, sigint_handler)
 
     worker_processes = []
@@ -422,22 +424,22 @@ def get_parallel_results(async_test_resu
         if (async_test_result == None):
             return
 
         # Notify parent that we got a result
         notify_queue.put(True)
 
         yield async_test_result
 
-def process_test_results_parallel(async_test_result_queue, return_queue, notify_queue, num_tests, options, js):
+def process_test_results_parallel(async_test_result_queue, return_queue, notify_queue, num_tests, options, js, lib_dir, shell_args):
     gen = get_parallel_results(async_test_result_queue, notify_queue)
-    ok = process_test_results(gen, num_tests, options, js)
+    ok = process_test_results(gen, num_tests, options, js, lib_dir, shell_args)
     return_queue.put(ok)
 
-def print_test_summary(failures, complete, doing, options):
+def print_test_summary(failures, complete, doing, options, lib_dir, shell_args):
     if failures:
         if options.write_failures:
             try:
                 out = open(options.write_failures, 'w')
                 # Don't write duplicate entries when we are doing multiple failures per job.
                 written = set()
                 for test, fout, ferr, fcode, _ in failures:
                     if test.path not in written:
@@ -470,17 +472,17 @@ def print_test_summary(failures, complet
             if timed_out:
                 show_test(test)
 
         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, js):
+def process_test_results(results, num_tests, options, js, lib_dir, shell_args):
     pb = NullProgressBar()
     if not options.hide_progress and not options.show_cmd and ProgressBar.conservative_isatty():
         fmt = [
             {'value': 'PASS',    'color': 'green'},
             {'value': 'FAIL',    'color': 'red'},
             {'value': 'TIMEOUT', 'color': 'blue'},
             {'value': 'SKIP',    'color': 'brightgray'},
         ]
@@ -519,27 +521,27 @@ def process_test_results(results, num_te
                 'TIMEOUT': timeouts,
                 'SKIP': 0}
             )
         complete = True
     except KeyboardInterrupt:
         print_tinderbox("TEST-UNEXPECTED-FAIL", None, "Test execution interrupted by user");
 
     pb.finish(True)
-    return print_test_summary(failures, complete, doing, options)
+    return print_test_summary(failures, complete, doing, options, lib_dir, shell_args)
 
 
 def get_serial_results(tests, lib_dir, shell_args):
     for test in tests:
         result = run_test(test, lib_dir, shell_args)
         yield result + (test,)
 
 def run_tests(tests, test_dir, lib_dir, shell_args):
     gen = get_serial_results(tests, lib_dir, shell_args)
-    ok = process_test_results(gen, len(tests), OPTIONS, JS)
+    ok = process_test_results(gen, len(tests), OPTIONS, JS, lib_dir, shell_args)
     return ok
 
 def parse_jitflags():
     jitflags = [ [ '-' + flag for flag in flags ]
                  for flags in OPTIONS.jitflags.split(',') ]
     for flags in jitflags:
         for flag in flags:
             if flag not in ('-m', '-a', '-p', '-d', '-n'):