Disable reporting of assertion failures in reftest a different way, so that the assertion counts per test are logged and can be collected. (Bug 472557)

--HG--
extra : transplant_source : X2%DC%8C%FEl%EE%A6%8C%CE%21%2BiKt%B8W%A8XO
This commit is contained in:
L. David Baron 2009-12-12 22:22:52 -08:00
parent db4bcb5f95
commit c3448a0175

View File

@ -589,6 +589,10 @@ function StartCurrentURI(aState)
function DoneTests()
{
// TEMPORARILY DISABLE REPORTING OF ASSERTION FAILURES.
gTestResults.AssertionUnexpected = 0;
gTestResults.AssertionUnexpectedFixed = 0;
dump("REFTEST FINISHED: Slowest test took " + gSlowestTestTime +
"ms (" + gSlowestTestURL + ")\n");
@ -1093,10 +1097,7 @@ function DoAssertionCheck()
gClearingForAssertionCheck = false;
if (gDebug.isDebugBuild) {
// TEMPORARILY DISABLING ASSERTION CHECKS FOR NOW. TO RE-ENABLE,
// USE COMMENTED LINE TO REPLACE FOLLOWING ONE.
// var newAssertionCount = gDebug.assertionCount;
var newAssertionCount = 0;
var newAssertionCount = gDebug.assertionCount;
var numAsserts = newAssertionCount - gAssertionCount;
gAssertionCount = newAssertionCount;
@ -1111,12 +1112,16 @@ function DoAssertionCheck()
if (numAsserts < minAsserts) {
++gTestResults.AssertionUnexpectedFixed;
dump("REFTEST TEST-UNEXPECTED-PASS | " + gURLs[0].prettyPath +
// TEMPORARILY DISABLING REPORTING ON TINDERBOX BY REVERSING
// THE WORD "UNEXPECTED".
dump("REFTEST TEST-DETCEPXENU-PASS | " + gURLs[0].prettyPath +
" | assertion count " + numAsserts + " is less than " +
expectedAssertions + "\n");
} else if (numAsserts > maxAsserts) {
++gTestResults.AssertionUnexpected;
dump("REFTEST TEST-UNEXPECTED-FAIL | " + gURLs[0].prettyPath +
// TEMPORARILY DISABLING REPORTING ON TINDERBOX BY REVERSING
// THE WORD "UNEXPECTED".
dump("REFTEST TEST-DETCEPXENU-FAIL | " + gURLs[0].prettyPath +
" | assertion count " + numAsserts + " is more than " +
expectedAssertions + "\n");
} else if (numAsserts != 0) {