diff --git a/test_runner/src/main/kotlin/ftl/ios/Xctestrun.kt b/test_runner/src/main/kotlin/ftl/ios/Xctestrun.kt index c38709b45d..5b3a34672f 100644 --- a/test_runner/src/main/kotlin/ftl/ios/Xctestrun.kt +++ b/test_runner/src/main/kotlin/ftl/ios/Xctestrun.kt @@ -26,15 +26,10 @@ object Xctestrun { val binaryRoot = productString.replace("__TESTROOT__/", testRoot) println("Found xctest: $binaryRoot") - val isSwift = Paths.get(binaryRoot, "libswiftRemoteMirror.dylib").toFile().exists() val binaryName = File(binaryRoot).nameWithoutExtension val binaryPath = Paths.get(binaryRoot, binaryName).toString() - val tests = if (isSwift) { - (Parse.parseObjcTests(binaryPath) + Parse.parseSwiftTests(binaryPath)).distinct() - } else { - Parse.parseObjcTests(binaryPath) - } + val tests = (Parse.parseObjcTests(binaryPath) + Parse.parseSwiftTests(binaryPath)).distinct() return tests.minus(skipTests) } diff --git a/test_runner/src/main/kotlin/ftl/run/IosTestRunner.kt b/test_runner/src/main/kotlin/ftl/run/IosTestRunner.kt index 250071e41c..383d79d89d 100644 --- a/test_runner/src/main/kotlin/ftl/run/IosTestRunner.kt +++ b/test_runner/src/main/kotlin/ftl/run/IosTestRunner.kt @@ -23,12 +23,6 @@ object IosTestRunner { suspend fun runTests(iosArgs: IosArgs): MatrixMap = coroutineScope { val (stopwatch, runGcsPath) = GenericTestRunner.beforeRunTests(iosArgs) - val xcTestGcsPath = if (iosArgs.xctestrunZip.startsWith(FtlConstants.GCS_PREFIX)) { - iosArgs.xctestrunZip - } else { - GcStorage.uploadXCTestZip(iosArgs, runGcsPath) - } - val iosDeviceList = GcIosMatrix.build(iosArgs.devices) val xcTestParsed = Xctestrun.parse(iosArgs.xctestrunFile) @@ -39,6 +33,13 @@ object IosTestRunner { val shardCounter = ShardCounter() val history = GcToolResults.createToolResultsHistory(iosArgs) + // Upload only after parsing shards to detect missing methods early. + val xcTestGcsPath = if (iosArgs.xctestrunZip.startsWith(FtlConstants.GCS_PREFIX)) { + iosArgs.xctestrunZip + } else { + GcStorage.uploadXCTestZip(iosArgs, runGcsPath) + } + println(beforeRunMessage(iosArgs)) repeat(runCount) { repeat(shardCount) { testShardsIndex ->