Title: [197001] trunk/Source/_javascript_Core
- Revision
- 197001
- Author
- [email protected]
- Date
- 2016-02-23 15:03:35 -0800 (Tue, 23 Feb 2016)
Log Message
JSC stress tests' standalone-pre.js should exit on the first failure by default
https://bugs.webkit.org/show_bug.cgi?id=154565
Reviewed by Mark Lam.
Currently, if a test writer does not call finishJSTest() at the end of
any test using stress/resources/standalone-pre.js then the test can fail
without actually reporting an error to the harness. By default, we
should throw on the first error so, in the event someone does not call
finishJSTest() the harness will still notice the error.
* tests/stress/regress-151324.js:
* tests/stress/resources/standalone-pre.js:
(testFailed):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (197000 => 197001)
--- trunk/Source/_javascript_Core/ChangeLog 2016-02-23 22:54:04 UTC (rev 197000)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-02-23 23:03:35 UTC (rev 197001)
@@ -1,3 +1,20 @@
+2016-02-23 Keith Miller <[email protected]>
+
+ JSC stress tests' standalone-pre.js should exit on the first failure by default
+ https://bugs.webkit.org/show_bug.cgi?id=154565
+
+ Reviewed by Mark Lam.
+
+ Currently, if a test writer does not call finishJSTest() at the end of
+ any test using stress/resources/standalone-pre.js then the test can fail
+ without actually reporting an error to the harness. By default, we
+ should throw on the first error so, in the event someone does not call
+ finishJSTest() the harness will still notice the error.
+
+ * tests/stress/regress-151324.js:
+ * tests/stress/resources/standalone-pre.js:
+ (testFailed):
+
2016-02-23 Saam barati <[email protected]>
Make JSObject::getMethod have fewer branches
Modified: trunk/Source/_javascript_Core/tests/stress/regress-151324.js (197000 => 197001)
--- trunk/Source/_javascript_Core/tests/stress/regress-151324.js 2016-02-23 22:54:04 UTC (rev 197000)
+++ trunk/Source/_javascript_Core/tests/stress/regress-151324.js 2016-02-23 23:03:35 UTC (rev 197001)
@@ -1695,5 +1695,6 @@
"type":"RenderingFrame"
}
}
-})`, `new ReferenceError("Can't find variable: InspectorFrontendAPI")`);
+})`, `new ReferenceError("Can't find variable: InspectorFrontendAPI").toString()`);
+finishJSTest();
Modified: trunk/Source/_javascript_Core/tests/stress/resources/standalone-pre.js (197000 => 197001)
--- trunk/Source/_javascript_Core/tests/stress/resources/standalone-pre.js 2016-02-23 22:54:04 UTC (rev 197000)
+++ trunk/Source/_javascript_Core/tests/stress/resources/standalone-pre.js 2016-02-23 23:03:35 UTC (rev 197001)
@@ -7,10 +7,11 @@
};
var silentMode = true;
+var throwOnFirstFail = true;
var silentTestPass, didPassSomeTestsSilently, didFailSomeTests, successfullyParsed;
silentTestPass = false;
didPassSomeTestsSilenty = false;
-didFaileSomeTests = false;
+didFailSomeTests = false;
function description(msg)
{
@@ -46,9 +47,10 @@
function testFailed(msg)
{
didFailSomeTests = true;
- if (silentMode)
- return;
- print("FAIL", escapeString(msg));
+ if (!silentMode)
+ print("FAIL", escapeString(msg));
+ if (throwOnFirstFail)
+ throw new Error(escapeString(msg));
}
function areNumbersEqual(_actual, _expected)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes