[K/N] Disable filecheck tests in some cases

This commit is contained in:
Sergey Bogolepov
2022-02-08 17:11:20 +03:00
committed by Space
parent b4cbe703cd
commit fbbe5cbd03
@@ -178,7 +178,11 @@ run {
// Add regular gradle test tasks
dependsOn(tasksOf(Test))
dependsOn(tasksOf(CoverageTest))
dependsOn(tasksOf(FileCheckTest))
// 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 (cacheTesting == null && !twoStageEnabled && project.testTarget != 'linux_mips32') {
dependsOn(tasksOf(FileCheckTest))
}
dependsOn(":kotlin-native:Interop:Indexer:check")
}
@@ -5900,6 +5904,7 @@ Task fileCheckTest(String name, Closure<FileCheckTest> configureClosure) {
task.configure(configureClosure)
task.llvmIr = project.file("$testOutputFileCheck/$name/$target/out.${task.phaseToCheck}.ll")
def target = task.target
boolean isCrossCompiling = target != project.target
if (task.enabled) {
konanArtifacts {
def lib = task.interop
@@ -5914,7 +5919,9 @@ Task fileCheckTest(String name, Closure<FileCheckTest> configureClosure) {
program(name, targets: [target]) {
srcFiles task.annotatedSource
baseDir "$testOutputFileCheck/$name"
extraOpts project.globalTestArgs
if (!isCrossCompiling) {
extraOpts project.globalTestArgs
}
extraOpts "-Xtemporary-files-dir=$testOutputFileCheck/$name/$target"
extraOpts "-Xsave-llvm-ir-after=${task.phaseToCheck}"
if (lib != null) {
@@ -5928,7 +5935,9 @@ Task fileCheckTest(String name, Closure<FileCheckTest> configureClosure) {
framework(name, targets: [target]) {
srcFiles task.annotatedSource
baseDir "$testOutputFileCheck/$name"
extraOpts project.globalTestArgs
if (!isCrossCompiling) {
extraOpts project.globalTestArgs
}
extraOpts "-Xtemporary-files-dir=$testOutputFileCheck/$name/$target", "-Xmeaningful-bridge-names"
extraOpts "-Xsave-llvm-ir-after=${task.phaseToCheck}"