[PL][tests] Run K/N tests (old infra) with PL enabled
This commit is contained in:
committed by
Space Team
parent
9f50f8ff2a
commit
468d524a74
@@ -264,7 +264,7 @@ Task linkTest(String name, Closure<KonanLinkTest> configureClosure) {
|
||||
srcFiles task.lib
|
||||
baseDir "$testOutputLocal/$name"
|
||||
extraOpts task.flags
|
||||
extraOpts project.globalTestArgs
|
||||
extraOpts project.globalTestArgs.findAll { !it.contains("-Xpartial-linkage") }
|
||||
}
|
||||
UtilsKt.dependsOnKonanBuildingTask(task, lib, target)
|
||||
|
||||
@@ -3424,7 +3424,8 @@ linkTest("mpp2") {
|
||||
}
|
||||
|
||||
standaloneTest("mpp_default_args") {
|
||||
disabled = isK2(project) // KT-56071
|
||||
// Disabled in one stage mode because of KT-57747
|
||||
disabled = !twoStageEnabled || isK2(project) // KT-56071
|
||||
source = "codegen/mpp/mpp_default_args.kt"
|
||||
flags = ['-tr', '-Xmulti-platform']
|
||||
}
|
||||
@@ -4477,7 +4478,7 @@ Task interopTestBase(String name, boolean multiFile, Closure<KonanInteropTest> c
|
||||
srcFiles task.lib
|
||||
baseDir "$testOutputLocal/$name"
|
||||
extraOpts task.flags
|
||||
extraOpts project.globalTestArgs
|
||||
extraOpts project.globalTestArgs.findAll { !it.contains("-Xpartial-linkage") }
|
||||
}
|
||||
UtilsKt.dependsOnKonanBuildingTask(task, lib, target)
|
||||
}
|
||||
|
||||
@@ -447,6 +447,9 @@ open class KonanDriverTest : KonanStandaloneTest() {
|
||||
addAll(getSources().get())
|
||||
addAll(flags)
|
||||
addAll(project.globalTestArgs)
|
||||
|
||||
add("-Xpartial-linkage=enable")
|
||||
add("-Xpartial-linkage-loglevel=error")
|
||||
}
|
||||
|
||||
// run konanc compiler locally
|
||||
|
||||
@@ -118,8 +118,25 @@ void loadCommandLineProperties() {
|
||||
if (project.hasProperty("konanc_flags")) {
|
||||
throw new Error("Specify either -Ptest_flags or -Pbuild_flags.")
|
||||
}
|
||||
ext.globalBuildArgs = project.hasProperty("build_flags") ? ext.build_flags.split() : []
|
||||
ext.globalTestArgs = project.hasProperty("test_flags") ? ext.test_flags.split() : []
|
||||
|
||||
ext.globalBuildArgs = new ArrayList<String>()
|
||||
if (project.hasProperty("build_flags")) {
|
||||
for (String flag : ext.build_flags.toString().split("\\s")) {
|
||||
flag = flag.trim()
|
||||
if (!flag.isEmpty()) ext.globalBuildArgs.add(flag)
|
||||
}
|
||||
}
|
||||
|
||||
ext.globalTestArgs = new ArrayList<String>()
|
||||
ext.globalTestArgs.add("-Xpartial-linkage=enable")
|
||||
ext.globalTestArgs.add("-Xpartial-linkage-loglevel=error")
|
||||
if (project.hasProperty("test_flags")) {
|
||||
for (String flag : ext.test_flags.toString().split("\\s")) {
|
||||
flag = flag.trim()
|
||||
if (!flag.isEmpty()) ext.globalTestArgs.add(flag)
|
||||
}
|
||||
}
|
||||
|
||||
ext.testTarget = project.hasProperty("test_target") ? ext.test_target : null
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -147,7 +147,7 @@ abstract class KonanCompileTask: KonanBuildingTask(), KonanCompileSpec {
|
||||
// Don't include coverage flags into the first stage because they are not supported when compiling a klib.
|
||||
private fun firstStageExtraOpts() = extraOpts
|
||||
.excludeFlags("-Xcoverage")
|
||||
.excludeArguments("-Xcoverage-file", "-Xlibrary-to-cover")
|
||||
.excludeArguments("-Xcoverage-file", "-Xlibrary-to-cover", "-Xpartial-linkage", "-Xpartial-linkage-loglevel")
|
||||
|
||||
// Don't include the -Xemit-lazy-objc-header flag into
|
||||
// the second stage because this stage have no sources.
|
||||
@@ -236,6 +236,11 @@ abstract class KonanCompileTask: KonanBuildingTask(), KonanCompileSpec {
|
||||
addArg("-linker-option", it)
|
||||
}
|
||||
|
||||
if (produce != CompilerOutputKind.LIBRARY) {
|
||||
add("-Xpartial-linkage=enable")
|
||||
add("-Xpartial-linkage-loglevel=error")
|
||||
}
|
||||
|
||||
addAll(extraOpts)
|
||||
|
||||
allSourceFiles.mapTo(this) { it.absolutePath }
|
||||
|
||||
Reference in New Issue
Block a user