зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1267020 - Dump reftest assertion count mismatches to log file on Android; r=jmaher
This commit is contained in:
Родитель
904004547f
Коммит
71f1e3bc75
|
@ -178,6 +178,12 @@ function HasUnexpectedResult()
|
|||
|
||||
// By default we just log to stdout
|
||||
var gLogFile = null;
|
||||
var gDumpFn = function(line) {
|
||||
dump(line);
|
||||
if (gLogFile) {
|
||||
gLogFile.write(line, line.length);
|
||||
}
|
||||
}
|
||||
var gDumpRawLog = function(record) {
|
||||
// Dump JSON representation of data on a single line
|
||||
var line = "\n" + JSON.stringify(record) + "\n";
|
||||
|
@ -1365,8 +1371,8 @@ function StartCurrentURI(aState)
|
|||
var currentTest = gTotalTests - gURLs.length;
|
||||
// Log this to preserve the same overall log format,
|
||||
// should be removed if the format is updated
|
||||
dump("REFTEST TEST-LOAD | " + gCurrentURL + " | " + currentTest + " / " + gTotalTests +
|
||||
" (" + Math.floor(100 * (currentTest / gTotalTests)) + "%)\n");
|
||||
gDumpFn("REFTEST TEST-LOAD | " + gCurrentURL + " | " + currentTest + " / " + gTotalTests +
|
||||
" (" + Math.floor(100 * (currentTest / gTotalTests)) + "%)\n");
|
||||
TestBuffer("START " + gCurrentURL);
|
||||
var type = gURLs[0].type
|
||||
if (TYPE_SCRIPT == type) {
|
||||
|
@ -1818,19 +1824,19 @@ function DoAssertionCheck(numAsserts)
|
|||
|
||||
if (numAsserts < minAsserts) {
|
||||
++gTestResults.AssertionUnexpectedFixed;
|
||||
dump("REFTEST TEST-UNEXPECTED-PASS | " + gURLs[0].prettyPath +
|
||||
" | assertion count" + numAsserts + " is less than " +
|
||||
expectedAssertions + "\n");
|
||||
gDumpFn("REFTEST TEST-UNEXPECTED-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 +
|
||||
" | assertion count " + numAsserts + " is more than " +
|
||||
expectedAssertions + "\n");
|
||||
gDumpFn("REFTEST TEST-UNEXPECTED-FAIL | " + gURLs[0].prettyPath +
|
||||
" | assertion count " + numAsserts + " is more than " +
|
||||
expectedAssertions + "\n");
|
||||
} else if (numAsserts != 0) {
|
||||
++gTestResults.AssertionKnown;
|
||||
dump("REFTEST TEST-KNOWN-FAIL | " + gURLs[0].prettyPath +
|
||||
"assertion count " + numAsserts + " matches " +
|
||||
expectedAssertions + "\n");
|
||||
gDumpFn("REFTEST TEST-KNOWN-FAIL | " + gURLs[0].prettyPath +
|
||||
"assertion count " + numAsserts + " matches " +
|
||||
expectedAssertions + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче