mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Show which test suite failed in the UnitTest logs.
This commit is contained in:
@@ -26,7 +26,7 @@ struct UnitTests: AsyncParsableCommand {
|
|||||||
"--retries", "3"
|
"--retries", "3"
|
||||||
]).run()
|
]).run()
|
||||||
} catch {
|
} catch {
|
||||||
failures.append("Unit tests failed: \(error)")
|
failures.append("UnitTests")
|
||||||
logger.error("\n❌ Unit tests failed. \(error)\n")
|
logger.error("\n❌ Unit tests failed. \(error)\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,8 @@ struct UnitTests: AsyncParsableCommand {
|
|||||||
do {
|
do {
|
||||||
try await PreviewTests.parse([]).run()
|
try await PreviewTests.parse([]).run()
|
||||||
} catch {
|
} catch {
|
||||||
failures.append("Preview tests failed: \(error)")
|
failures.append("PreviewTests")
|
||||||
|
logger.error("\n❌ Preview tests failed. \(error)\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +48,8 @@ struct UnitTests: AsyncParsableCommand {
|
|||||||
await CI.collectTestResults(resultBundle: "UnitTests.xcresult", outputName: "unit-junit.xml")
|
await CI.collectTestResults(resultBundle: "UnitTests.xcresult", outputName: "unit-junit.xml")
|
||||||
|
|
||||||
if !failures.isEmpty {
|
if !failures.isEmpty {
|
||||||
logger.error("\n❌ \(failures.count) test suite(s) failed.\n")
|
let failedSuites = "[\(failures.joined(separator: ","))]"
|
||||||
|
logger.error("\n❌ \(failures.count) test suite(s) failed \(failedSuites)\n")
|
||||||
throw ExitCode.failure
|
throw ExitCode.failure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user