From 33abe97e25a29a4aa3453cd9f71f23bef754579e Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Mon, 3 May 2010 15:25:57 -0700 Subject: [PATCH] Bug 563077 - fix handling of tests marked as 'random' so crashes are reported. r=dmandelin --- js/src/tests/js1_5/Regress/jstests.list | 2 +- js/src/tests/js1_6/extensions/jstests.list | 2 +- js/src/tests/js1_6/extensions/regress-456826.js | 1 + js/src/tests/jstests.py | 8 ++++---- js/src/tests/tests.py | 10 ++++++---- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/js/src/tests/js1_5/Regress/jstests.list b/js/src/tests/js1_5/Regress/jstests.list index d0f2a22420b..782b2d48007 100644 --- a/js/src/tests/js1_5/Regress/jstests.list +++ b/js/src/tests/js1_5/Regress/jstests.list @@ -243,7 +243,7 @@ skip-if(xulRuntime.OS=="WINNT"&&isDebugBuild) script regress-418540.js # slow script regress-419018.js script regress-419803.js script regress-420919.js -fails-if(xulRuntime.OS=="Linux"&&xulRuntime.XPCOMABI.match(/x86_64/)) script regress-422348.js # No test results +skip-if(xulRuntime.OS=="Linux"&&xulRuntime.XPCOMABI.match(/x86_64/)) script regress-422348.js # On 64-bit Linux, takes forever rather than throwing script regress-424311.js skip-if(xulRuntime.OS=="WINNT"&&isDebugBuild) script regress-425360.js # slow script regress-426827.js diff --git a/js/src/tests/js1_6/extensions/jstests.list b/js/src/tests/js1_6/extensions/jstests.list index 10e5510c66c..c55f00dd1f6 100644 --- a/js/src/tests/js1_6/extensions/jstests.list +++ b/js/src/tests/js1_6/extensions/jstests.list @@ -7,7 +7,7 @@ fails-if(!xulRuntime.shell) script regress-455464-01.js # bug - NS_ERROR_DOM_NOT fails-if(!xulRuntime.shell) script regress-455464-02.js # bug - NS_ERROR_DOM_NOT_SUPPORTED_ERR line 49 fails-if(!xulRuntime.shell) script regress-455464-03.js # bug - NS_ERROR_DOM_NOT_SUPPORTED_ERR line 1 fails-if(!xulRuntime.shell&&!isDebugBuild) skip-if(!xulRuntime.shell&&isDebugBuild) script regress-455464-04.js # bug xxx - hangs reftests in debug, ### bug xxx - NS_ERROR_DOM_NOT_SUPPORTED_ERR in opt -fails-if(xulRuntime.shell) skip-if(!xulRuntime.shell) script regress-456826.js # bug 504632 +skip-if(!xulRuntime.shell) script regress-456826.js # bug 504632 script regress-457521.js script regress-465443.js script regress-470310.js diff --git a/js/src/tests/js1_6/extensions/regress-456826.js b/js/src/tests/js1_6/extensions/regress-456826.js index 7355a4ee342..1a7a9a4c6ee 100644 --- a/js/src/tests/js1_6/extensions/regress-456826.js +++ b/js/src/tests/js1_6/extensions/regress-456826.js @@ -58,6 +58,7 @@ function test() if (typeof gcparam != 'undefined') { gcparam("maxBytes", 22000); + expectExitCode(5); } const numRows = 600; diff --git a/js/src/tests/jstests.py b/js/src/tests/jstests.py index 29feb356b69..6541e9b07a2 100644 --- a/js/src/tests/jstests.py +++ b/js/src/tests/jstests.py @@ -125,10 +125,10 @@ class ResultsSink: # key is (result, expect, random) # value is (tinderbox label, dev test category) LABELS = { - (TestResult.CRASH, False, False): ('TEST-KNOWN-FAIL', ''), - (TestResult.CRASH, False, True): ('TEST-KNOWN-FAIL (EXPECTED RANDOM)', ''), + (TestResult.CRASH, False, False): ('TEST-UNEXPECTED-FAIL', 'REGRESSIONS'), + (TestResult.CRASH, False, True): ('TEST-UNEXPECTED-FAIL', 'REGRESSIONS'), (TestResult.CRASH, True, False): ('TEST-UNEXPECTED-FAIL', 'REGRESSIONS'), - (TestResult.CRASH, True, True): ('TEST-KNOWN-FAIL (EXPECTED RANDOM)', ''), + (TestResult.CRASH, True, True): ('TEST-UNEXPECTED-FAIL', 'REGRESSIONS'), (TestResult.FAIL, False, False): ('TEST-KNOWN-FAIL', ''), (TestResult.FAIL, False, True): ('TEST-KNOWN-FAIL (EXPECTED RANDOM)', ''), @@ -201,7 +201,7 @@ if __name__ == '__main__': op.add_option('-t', '--timeout', dest='timeout', type=float, default=60.0, help='set test timeout in seconds') op.add_option('-d', '--exclude-random', dest='random', action='store_false', - help='exclude tests marked random') + help='exclude tests marked random', default=True) op.add_option('--run-skipped', dest='run_skipped', action='store_true', help='run skipped tests') op.add_option('--run-only-skipped', dest='run_only_skipped', action='store_true', diff --git a/js/src/tests/tests.py b/js/src/tests/tests.py index dc3db967f22..ebb1073450c 100644 --- a/js/src/tests/tests.py +++ b/js/src/tests/tests.py @@ -131,6 +131,8 @@ class TestResult: passes = 0 expected_rcs = [] + if test.path.endswith('-n.js'): + expected_rcs.append(3) for line in out.split('\n'): if line.startswith(' FAILED!'): @@ -146,13 +148,13 @@ class TestResult: if m: expected_rcs.append(int(m.group(1))) - if rc: - if (test.path.endswith('-n.js') and rc == 3) or rc in expected_rcs: - result = cls.PASS + if rc and not rc in expected_rcs: + if rc == 3: + result = cls.FAIL else: result = cls.CRASH else: - if passes > 0 and failures == 0: + if (rc or passes > 0) and failures == 0: result = cls.PASS else: result = cls.FAIL