[K/N][Tests] Cleanup support code for objCFrameworks in old testinfra

^KT-61259
This commit is contained in:
Vladimir Sukharev
2024-02-07 12:24:41 +01:00
committed by Space Team
parent a4854cf81f
commit 6c78ec88c2
2 changed files with 0 additions and 191 deletions
@@ -123,8 +123,6 @@ allprojects {
// backend.native/tests/framework
ext.testOutputFramework = rootProject.file("$testOutputRoot/framework")
ext.testOutputFileCheck = rootProject.file("$testOutputRoot/filecheck")
}
testOutputExternal.mkdirs()
@@ -177,7 +175,6 @@ tasks.named("clean", Delete.class) {
tasks.named("run") {
dependsOn(tasks.withType(KonanTest).matching { it.enabled })
dependsOn(tasks.withType(FileCheckTest).matching { it.enabled })
// Add regular gradle test tasks
dependsOn(tasks.withType(Test).matching { it.enabled })
// TODO(KTI-1571): This task should be run by Compiler Unit Tests (Native) configuration
@@ -1950,71 +1947,6 @@ pluginTest("runtime_basic_init", "nopPlugin") {
flags = ["-tr"]
}
Task fileCheckTest(String name, Closure<FileCheckTest> configureClosure) {
return project.tasks.create(name, FileCheckTest) { FileCheckTest task ->
task.configure(configureClosure)
task.llvmIr = project.file("$testOutputFileCheck/$name/$target/out.${task.phaseToCheck}.ll")
KonanTarget target = task.target
boolean isCrossCompiling = target != project.target
// Bitcode that is generated in presence of caches or two-stage compilation differs from the "closed world"-generated,
// so disable these tests for now.
if (task.enabled && twoStageEnabled)
task.enabled = false
if (task.enabled) {
konanArtifacts {
def lib = task.interop
if (lib != null) {
UtilsKt.dependsOnKonanBuildingTask(task, lib, target)
}
if (!task.generateFramework) {
// We could use `bitcode` here to make things faster. But:
// 1. `bitcode` has no other usages.
// 2. Unification should help porting to the new test infra.
// 3. Compiler might behave differently when outputting bitcode instead of object files.
program(name, targets: [target]) {
srcFiles task.annotatedSource
baseDir "$testOutputFileCheck/$name"
if (!isCrossCompiling) {
extraOpts project.globalTestArgs
}
extraOpts task.extraOpts
extraOpts "-Xsave-llvm-ir-directory=$testOutputFileCheck/$name/$target"
extraOpts "-Xsave-llvm-ir-after=${task.phaseToCheck}"
if (lib != null) {
libraries {
artifact lib
}
}
}
} else {
// Framework support is much weakier than `frameworkTest`, but we don't need much.
framework(name, targets: [target]) {
srcFiles task.annotatedSource
baseDir "$testOutputFileCheck/$name"
if (!isCrossCompiling) {
extraOpts project.globalTestArgs
}
extraOpts "-Xsave-llvm-ir-directory=$testOutputFileCheck/$name/$target"
extraOpts "-Xsave-llvm-ir-after=${task.phaseToCheck}"
if (lib != null) {
libraries {
artifact lib
}
}
}
}
UtilsKt.dependsOnKonanBuildingTask(task, name, target)
}
task.dependsOn(nativeDependencies.llvmDependency)
}
}
}
dependencies {
nopPluginApi kotlinCompilerModule
nopPluginApi project(":native:kotlin-native-utils")