From 44bac41def49bd73d03e727b5bc609b819b03120 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Wed, 3 Apr 2019 19:08:40 -0400 Subject: [PATCH] Update exit code reporting --- .../main/kotlin/ftl/reports/util/ReportManager.kt | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/test_runner/src/main/kotlin/ftl/reports/util/ReportManager.kt b/test_runner/src/main/kotlin/ftl/reports/util/ReportManager.kt index 4a38f03ff2..b22552304b 100644 --- a/test_runner/src/main/kotlin/ftl/reports/util/ReportManager.kt +++ b/test_runner/src/main/kotlin/ftl/reports/util/ReportManager.kt @@ -97,8 +97,6 @@ object ReportManager { val useFlakyTests = args.flakyTestAttempts > 0 if (useFlakyTests) JUnitDedupe.modify(testSuite) - val testSuccessful = if (useFlakyTests) testSuite?.successful() ?: false else matrices.allSuccessful() - listOf( CostReport, MatrixResultsReport @@ -106,7 +104,7 @@ object ReportManager { it.run(matrices, testSuite, printToStdout = true, args = args) } - if (!testSuccessful) { + if (matrices.allSuccessful().not()) { listOf( HtmlErrorReport ).map { it.run(matrices, testSuite, printToStdout = false, args = args) } @@ -115,14 +113,7 @@ object ReportManager { JUnitReport.run(matrices, testSuite, printToStdout = false, args = args) processJunitXml(testSuite, args) - // FTL has a bug with matrix roll-up when using flakyTestAttempts - // as a work around, we calculate the success based on JUnit XML results. - val exitCode = if (useFlakyTests) { - if (testSuccessful) 0 else 1 - } else { - matrices.exitCode() - } - return exitCode + return matrices.exitCode() } data class ShardEfficiency(