[K/N] Remove check for bitcode embedding ^KT-61875
This removes the check in old testing infra for FrameworkTest.
This commit is contained in:
committed by
Space Team
parent
406d1eaf89
commit
004ef267c5
@@ -220,8 +220,3 @@ fun Project.executeAndCheck(executable: Path, arguments: List<String> = emptyLis
|
|||||||
* @see Project.exec
|
* @see Project.exec
|
||||||
*/
|
*/
|
||||||
fun localExecutor(project: Project) = { a: Action<in ExecSpec> -> project.exec(a) }
|
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)
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -137,8 +137,6 @@ open class FrameworkTest : DefaultTask(), KonanTestExecutable {
|
|||||||
frameworks.forEach { framework ->
|
frameworks.forEach { framework ->
|
||||||
val frameworkArtifact = framework.artifact
|
val frameworkArtifact = framework.artifact
|
||||||
val frameworkPath = "$frameworkParentDirPath/$frameworkArtifact.framework"
|
val frameworkPath = "$frameworkParentDirPath/$frameworkArtifact.framework"
|
||||||
val frameworkBinaryPath = "$frameworkPath/$frameworkArtifact"
|
|
||||||
validateBitcodeEmbedding(frameworkBinaryPath)
|
|
||||||
if (codesign) codesign(project, frameworkPath)
|
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 " }
|
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() }
|
private val xcode by lazy { Xcode.findCurrent() }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user