Bug 970063 - Ignore jit-test timeouts on Windows 7 and Windows Server 2008. r=terrence, a=test-only
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 07 Apr 2014 11:05:00 -0700
changeset 192632 7b78be58f03f0eb9370f7cefd38a2e362d2a0844
parent 192631 c5914323fd7b5dcf596c1e2bf73f4e1aee98d8fb
child 192633 04c4de891e69713600a64ce4ae34c7f2b665dffc
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence, test-only
bugs970063
milestone30.0a2
Bug 970063 - Ignore jit-test timeouts on Windows 7 and Windows Server 2008. r=terrence, a=test-only
js/src/tests/lib/jittests.py
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -335,17 +335,28 @@ def run_test_remote(test, device, prefix
     returncode = device.shell(cmd, buf, env=env, cwd=options.remote_test_root,
                               timeout=int(options.timeout))
 
     out = buf.getvalue()
     # We can't distinguish between stdout and stderr so we pass
     # the same buffer to both.
     return TestOutput(test, cmd, out, out, returncode, None, False)
 
-def check_output(out, err, rc, test):
+def check_output(out, err, rc, timed_out, test):
+    if timed_out:
+        # The shell sometimes hangs on shutdown on Windows 7 and Windows
+        # Server 2008. See bug 970063 comment 7 for a description of the
+        # problem. Until bug 956899 is fixed, ignore timeouts on these
+        # platforms (versions 6.0 and 6.1).
+        if sys.platform == 'win32':
+            ver = sys.getwindowsversion()
+            if ver.major == 6 and ver.minor <= 1:
+                return True
+        return False
+
     if test.expect_error:
         # The shell exits with code 3 on uncaught exceptions.
         # Sometimes 0 is returned on Windows for unknown reasons.
         # See bug 899697.
         if sys.platform in ['win32', 'cygwin']:
             if rc != 3 and rc != 0:
                 return False
         else:
@@ -577,17 +588,17 @@ def process_test_results(results, num_te
         for i, res in enumerate(results):
             if options.show_output:
                 sys.stdout.write(res.out)
                 sys.stdout.write(res.err)
                 sys.stdout.write('Exit code: %s\n' % res.rc)
             if res.test.valgrind:
                 sys.stdout.write(res.err)
 
-            ok = check_output(res.out, res.err, res.rc, res.test)
+            ok = check_output(res.out, res.err, res.rc, res.timed_out, res.test)
             doing = 'after %s' % res.test.relpath_tests
             if not ok:
                 failures.append(res)
                 if res.timed_out:
                     pb.message("TIMEOUT - %s" % res.test.relpath_tests)
                     timeouts += 1
                 else:
                     pb.message("FAIL - %s" % res.test.relpath_tests)