Bug 1410165 - Make the test harness properly listen to crash events when running a test more than once; r?mconley
MozReview-Commit-ID: C3PDtOfaz0v
--- a/testing/mochitest/tests/SimpleTest/TestRunner.js
+++ b/testing/mochitest/tests/SimpleTest/TestRunner.js
@@ -453,29 +453,29 @@ TestRunner.runNextTest = function() {
// ... the count,
$("fail-count").innerHTML = 1;
// ... the indicator.
var indicator = $("indicator");
indicator.innerHTML = "Status: Fail (No checks actually run)";
indicator.style.backgroundColor = "red";
}
- SpecialPowers.unregisterProcessCrashObservers();
-
let e10sMode = SpecialPowers.isMainProcess() ? "non-e10s" : "e10s";
TestRunner.structuredLogger.info("TEST-START | Shutdown");
TestRunner.structuredLogger.info("Passed: " + passCount);
TestRunner.structuredLogger.info("Failed: " + failCount);
TestRunner.structuredLogger.info("Todo: " + todoCount);
TestRunner.structuredLogger.info("Mode: " + e10sMode);
TestRunner.structuredLogger.info("Slowest: " + TestRunner.slowestTestTime + 'ms - ' + TestRunner.slowestTestURL);
- // If we are looping, don't send this cause it closes the log file
+ // If we are looping, don't send this cause it closes the log file,
+ // also don't unregister the crash observers until we're done.
if (TestRunner.repeat === 0) {
+ SpecialPowers.unregisterProcessCrashObservers();
TestRunner.structuredLogger.info("SimpleTest FINISHED");
}
if (TestRunner.repeat === 0 && TestRunner.onComplete) {
TestRunner.onComplete();
}
if (TestRunner._currentLoop <= TestRunner.repeat && !TestRunner._haltTests) {