diff --git a/kotlin-native/backend.native/tests/build.gradle b/kotlin-native/backend.native/tests/build.gradle index 5bdcbbe6e25..7c248a6cc42 100644 --- a/kotlin-native/backend.native/tests/build.gradle +++ b/kotlin-native/backend.native/tests/build.gradle @@ -178,7 +178,11 @@ run { // Add regular gradle test tasks dependsOn(tasksOf(Test)) dependsOn(tasksOf(CoverageTest)) - dependsOn(tasksOf(FileCheckTest)) + // Bitcode that is generated in presence of caches or two-stage compilation differs from the "closed world"-generated, + // so disable these tests for now. + if (cacheTesting == null && !twoStageEnabled && project.testTarget != 'linux_mips32') { + dependsOn(tasksOf(FileCheckTest)) + } dependsOn(":kotlin-native:Interop:Indexer:check") } @@ -5900,6 +5904,7 @@ Task fileCheckTest(String name, Closure configureClosure) { task.configure(configureClosure) task.llvmIr = project.file("$testOutputFileCheck/$name/$target/out.${task.phaseToCheck}.ll") def target = task.target + boolean isCrossCompiling = target != project.target if (task.enabled) { konanArtifacts { def lib = task.interop @@ -5914,7 +5919,9 @@ Task fileCheckTest(String name, Closure configureClosure) { program(name, targets: [target]) { srcFiles task.annotatedSource baseDir "$testOutputFileCheck/$name" - extraOpts project.globalTestArgs + if (!isCrossCompiling) { + extraOpts project.globalTestArgs + } extraOpts "-Xtemporary-files-dir=$testOutputFileCheck/$name/$target" extraOpts "-Xsave-llvm-ir-after=${task.phaseToCheck}" if (lib != null) { @@ -5928,7 +5935,9 @@ Task fileCheckTest(String name, Closure configureClosure) { framework(name, targets: [target]) { srcFiles task.annotatedSource baseDir "$testOutputFileCheck/$name" - extraOpts project.globalTestArgs + if (!isCrossCompiling) { + extraOpts project.globalTestArgs + } extraOpts "-Xtemporary-files-dir=$testOutputFileCheck/$name/$target", "-Xmeaningful-bridge-names" extraOpts "-Xsave-llvm-ir-after=${task.phaseToCheck}"