mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-24 18:59:36 +00:00
Speed up CI test retries and skip diagnostics collection on failure
Drop -test-repetition-relaunch-enabled from the run-tests command. With it, xcodebuild re-runs the whole test selection after any failure, even though Swift Testing (6.4+) already retries just the failing test case in-process. The tradeoff is that a runner crash is no longer retried. Set diagnosticCollectionPolicy to Never in the UnitTests and PreviewTests plans. On any recorded issue xcodebuild otherwise tries to collect simulator diagnostics, which locally timed out after 600 seconds. IntegrationTests keeps its Always policy.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
],
|
||||
"defaultOptions" : {
|
||||
"defaultTestExecutionTimeAllowance" : 60,
|
||||
"diagnosticCollectionPolicy" : "Never",
|
||||
"environmentVariableEntries" : [
|
||||
{
|
||||
"key" : "IS_RUNNING_UNIT_TESTS",
|
||||
|
||||
@@ -147,12 +147,11 @@ struct RunTests: AsyncParsableCommand {
|
||||
|
||||
// Use xcodebuild's native retry support to re-run only failing tests
|
||||
// instead of re-running the entire suite. retries=0 means no retries (single run).
|
||||
// No -test-repetition-relaunch-enabled: it re-runs the whole selection after any failure.
|
||||
if retries > 0 {
|
||||
// -test-iterations is the total number of attempts (initial + retries)
|
||||
command += " -retry-tests-on-failure"
|
||||
command += " -test-iterations \(retries + 1)"
|
||||
// Ensure retries still happen when a runner exits early.
|
||||
command += " -test-repetition-relaunch-enabled YES"
|
||||
}
|
||||
|
||||
if let testName {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
],
|
||||
"defaultOptions" : {
|
||||
"defaultTestExecutionTimeAllowance" : 60,
|
||||
"diagnosticCollectionPolicy" : "Never",
|
||||
"environmentVariableEntries" : [
|
||||
{
|
||||
"key" : "IS_RUNNING_UNIT_TESTS",
|
||||
|
||||
Reference in New Issue
Block a user