[K/N] Fix FrameworkTest with compileOnlyTests.

This commit is contained in:
Alexander Shabalin
2023-10-19 13:24:25 +02:00
committed by Space Team
parent 4f85cdbaed
commit e4b34857c0
@@ -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)" }
}
}