[K/N] Remove check for bitcode embedding ^KT-61875

This removes the check in old testing infra for FrameworkTest.
This commit is contained in:
Alexander Shabalin
2023-09-08 18:33:29 +02:00
committed by Space Team
parent 406d1eaf89
commit 004ef267c5
2 changed files with 1 additions and 30 deletions
@@ -219,9 +219,4 @@ fun Project.executeAndCheck(executable: Path, arguments: List<String> = emptyLis
* Returns [project]'s process executor.
* @see Project.exec
*/
fun localExecutor(project: Project) = { a: Action<in ExecSpec> -> project.exec(a) }
fun localExecutorService(project: Project): ExecutorService = object : ExecutorService {
override val project: Project get() = project
override fun execute(action: Action<in ExecSpec>): ExecResult? = project.exec(action)
}
fun localExecutor(project: Project) = { a: Action<in ExecSpec> -> project.exec(a) }
@@ -137,8 +137,6 @@ open class FrameworkTest : DefaultTask(), KonanTestExecutable {
frameworks.forEach { framework ->
val frameworkArtifact = framework.artifact
val frameworkPath = "$frameworkParentDirPath/$frameworkArtifact.framework"
val frameworkBinaryPath = "$frameworkPath/$frameworkArtifact"
validateBitcodeEmbedding(frameworkBinaryPath)
if (codesign) codesign(project, frameworkPath)
}
@@ -249,27 +247,5 @@ open class FrameworkTest : DefaultTask(), KonanTestExecutable {
check(exitCode == expectedExitStatus ?: 0) { "${timeoutMessage}Execution of $testExecName failed with exit code: $exitCode " }
}
private fun validateBitcodeEmbedding(frameworkBinary: String) {
// Check only the full bitcode embedding for now.
if (!fullBitcode) {
return
}
val configurables = project.testTargetConfigurables as AppleConfigurables
val bitcodeBuildTool = "${configurables.absoluteAdditionalToolsDir}/bin/bitcode-build-tool"
val toolPath = "${configurables.absoluteTargetToolchain}/usr/bin/"
if (configurables.targetTriple.isSimulator) {
return // bitcode-build-tool doesn't support simulators.
}
val sdk = xcode.pathToPlatformSdk(configurables.platformName())
val python3 = listOf("/usr/bin/python3", "/usr/local/bin/python3")
.map { Paths.get(it) }.firstOrNull { Files.exists(it) }
?: error("Can't find python3")
runTest(executorService = localExecutorService(project), testExecutable = python3,
args = listOf("-B", bitcodeBuildTool, "--sdk", sdk, "-v", "-t", toolPath, frameworkBinary))
}
private val xcode by lazy { Xcode.findCurrent() }
}