commit 3c4c1f894421b303c4fe62e9b9cea3225e611ba9
parent 8055beeb471810c0b4742493854e9a64335ab550
Author: Florian Quèze <florian@queze.net>
Date: Thu, 9 Oct 2025 05:54:09 +0000
Bug 1993255 - xpcshell tests that crash while running in parallel should be retried, r=jmaher.
Differential Revision: https://phabricator.services.mozilla.com/D267967
Diffstat:
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py
@@ -1042,6 +1042,14 @@ class XPCShellTestThread(Thread):
if self.timedout:
return
+ # Check for crashes before logging test_end
+ found_crash = self.checkForCrashes(
+ self.tempDir, self.symbolsPath, test_name=name
+ )
+ if found_crash:
+ status = "CRASH"
+ message = "Test crashed"
+
if status != expected or ended_before_crash_reporter_init:
if ended_before_crash_reporter_init:
self.log.test_end(
@@ -1052,11 +1060,16 @@ class XPCShellTestThread(Thread):
group=group,
)
elif self.retry:
+ retry_message = (
+ "Test crashed, will retry"
+ if status == "CRASH"
+ else "Test failed or timed out, will retry"
+ )
self.log.test_end(
name,
status,
expected=status,
- message="Test failed or timed out, will retry",
+ message=retry_message,
group=group,
)
self.clean_temp_dirs(path)
@@ -1097,16 +1110,6 @@ class XPCShellTestThread(Thread):
else:
self.todoCount = 1
- if self.checkForCrashes(self.tempDir, self.symbolsPath, test_name=name):
- if self.retry:
- self.clean_temp_dirs(path)
- return
-
- # If we assert during shutdown there's a chance the test has passed
- # but we haven't logged full output, so do so here.
- self.log_full_output()
- self.failCount = 1
-
if self.logfiles and process_output:
self.createLogFile(name, process_output)