From 004ef267c55b3bcbe75437dfa14100c20e9d5272 Mon Sep 17 00:00:00 2001 From: Alexander Shabalin Date: Fri, 8 Sep 2023 18:33:29 +0200 Subject: [PATCH] [K/N] Remove check for bitcode embedding ^KT-61875 This removes the check in old testing infra for FrameworkTest. --- .../org/jetbrains/kotlin/ExecutorService.kt | 7 +----- .../org/jetbrains/kotlin/FrameworkTest.kt | 24 ------------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/ExecutorService.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/ExecutorService.kt index 702dd340b27..6945fd5b347 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/ExecutorService.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/ExecutorService.kt @@ -219,9 +219,4 @@ fun Project.executeAndCheck(executable: Path, arguments: List = emptyLis * Returns [project]'s process executor. * @see Project.exec */ -fun localExecutor(project: Project) = { a: Action -> project.exec(a) } - -fun localExecutorService(project: Project): ExecutorService = object : ExecutorService { - override val project: Project get() = project - override fun execute(action: Action): ExecResult? = project.exec(action) -} +fun localExecutor(project: Project) = { a: Action -> project.exec(a) } \ No newline at end of file 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 6c571624265..2d81df8f933 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 @@ -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() } }