Bug 996987 - Always allow exit code 0 when checking for exit codes in Windows, because Windows. (r=terrence)
authorShu-yu Guo <shu@rfrn.org>
Wed, 23 Apr 2014 14:35:33 -0700
changeset 180216 2084e0ea923c2e8b0635cd6c3302f39b2565fbfa
parent 180215 f6ab7b316153bc5e8175855a879f8c3fa4d506fd
child 180217 ba2e9970b80f05a995276cc9805d5a4f5305b7a1
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersterrence
bugs996987
milestone31.0a1
Bug 996987 - Always allow exit code 0 when checking for exit codes in Windows, because Windows. (r=terrence)
js/src/tests/lib/jittests.py
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -369,16 +369,22 @@ def check_output(out, err, rc, timed_out
         if line.startswith('Trace stats check failed'):
             return False
 
     for line in err.split('\n'):
         if 'Assertion failed:' in line:
             return False
 
     if rc != test.expect_status:
+        # Tests which expect a timeout check for exit code 6.
+        # Sometimes 0 is returned on Windows for unknown reasons.
+        # See bug 899697.
+        if sys.platform in ['win32', 'cygwin'] and rc == 0:
+            return True
+
         # Allow a non-zero exit code if we want to allow OOM, but only if we
         # actually got OOM.
         return test.allow_oom and 'out of memory' in err and 'Assertion failure' not in err
 
     return True
 
 def print_tinderbox(ok, res):
     # Output test failures in a TBPL parsable format, eg: