From e4b34857c0580545ed6af1571252c5a51295fdf4 Mon Sep 17 00:00:00 2001 From: Alexander Shabalin Date: Thu, 19 Oct 2023 13:24:25 +0200 Subject: [PATCH] [K/N] Fix FrameworkTest with compileOnlyTests. --- .../src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt index 68b882d51cc..b3f2c7bc318 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt @@ -203,6 +203,7 @@ open class FrameworkTest : DefaultTask(), KonanTestExecutable { val timeoutMessage = if (exitCode == -1) { "WARNING: probably a timeout\n" } else "" - check(exitCode == (expectedExitStatus ?: 0)) { "${timeoutMessage}Execution of $testExecName failed with exit code: $exitCode " } + val expectedExitCode = expectedExitStatus?.takeUnless { project.compileOnlyTests } ?: 0 + check(exitCode == expectedExitCode) { "${timeoutMessage}Execution of $testExecName failed with exit code: $exitCode (expected exit code: $expectedExitCode)" } } }