Bug 1381091 - Check for crash dumps before running the first reftest. r=ahal

This avoids mistakenly blaming the first reftest in the suite for a crash that
happens during startup. Blaming that reftest can result in fragmentation of the
resulting issues because any bugs filed by sheriffs will be test-specific instead
of grouped together into a single bug.

MozReview-Commit-ID: K4YelNzXxzg

--HG--
extra : rebase_source : b291f365956997bbc3d591addee6817ad3e0ff9b
This commit is contained in:
Kartikaya Gupta 2017-07-18 13:10:29 -04:00
Родитель b755dcdd5f
Коммит 90294f253c
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -477,6 +477,11 @@ function StartTests()
gCleanupPendingCrashes = prefs.getBoolPref("reftest.cleanupPendingCrashes", false);
// Check if there are any crash dump files from the startup procedure, before
// we start running the first test. Otherwise the first test might get
// blamed for producing a crash dump file when that was not the case.
CleanUpCrashDumpFiles();
// When we repeat this function is called again, so really only want to set
// gRepeat once.
if (gRepeat == null) {
@ -1924,7 +1929,11 @@ function FindUnexpectedCrashDumpFiles()
if (!foundCrashDumpFile) {
++gTestResults.UnexpectedFail;
foundCrashDumpFile = true;
logger.testEnd(gCurrentURL, "FAIL", "PASS", "This test left crash dumps behind, but we weren't expecting it to!");
if (gCurrentURL) {
logger.testEnd(gCurrentURL, "FAIL", "PASS", "This test left crash dumps behind, but we weren't expecting it to!");
} else {
logger.error("Harness startup left crash dumps behind, but we weren't expecting it to!");
}
}
logger.info("Found unexpected crash dump file " + path);
gUnexpectedCrashDumpFiles[path] = true;