[K/N][Tests] Clean up framework testing code

^KT-61259
This commit is contained in:
Vladimir Sukharev
2024-01-31 14:56:37 +01:00
committed by Space Team
parent c72443e4be
commit 95b1fba37f
3 changed files with 4 additions and 252 deletions
@@ -189,6 +189,8 @@ internal fun invokeSwiftC(
File(configs.absoluteTargetToolchain).resolveSibling("ExtraFrameworks").absolutePath
}
} catch (rpe: RunProcessException) {
if (rpe.exitCode == null)
throw rpe // Treat compiler timeouts as fatal errors
return CompilationToolCallResult(
exitCode = ExitCode.COMPILATION_ERROR,
toolOutput = "ARGS: $args\nSTDOUT: ${rpe.stdout}\nSTDERR: ${rpe.stderr}",
@@ -207,11 +209,7 @@ internal fun invokeSwiftC(
internal fun codesign(path: String) {
val executableAbsolutePath = "/usr/bin/codesign"
val args = arrayOf("--verbose", "-s", "-", path)
try {
runProcess(executableAbsolutePath, *args) {
timeout = Duration.parse("30s")
}
} catch (rpe: RunProcessException) {
throw AssertionError("`$executableAbsolutePath ${args.joinToString(" ")}` failed with exitCode=${rpe.exitCode}: ${rpe.message}")
runProcess(executableAbsolutePath, *args) {
timeout = Duration.parse("30s")
}
}