[K/N][tests] Move gradle stuff for old infra to old infra

This commit is contained in:
Alexander Shabalin
2024-03-04 23:03:14 +01:00
committed by Space Team
parent c818ce9220
commit bb8c8431e8
3 changed files with 38 additions and 38 deletions
@@ -20,6 +20,43 @@ buildscript {
}
}
void loadLocalProperties() {
if (new File("$project.rootDir/local.properties").exists()) {
Properties props = new Properties()
props.load(new FileInputStream("$project.rootDir/local.properties"))
props.each { prop -> project.ext.set(prop.key, prop.value) }
}
}
void loadCommandLineProperties() {
if (project.hasProperty("konanc_flags")) {
throw new Error("Specify either -Ptest_flags or -Pbuild_flags.")
}
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 : PlatformInfo.hostName
}
loadCommandLineProperties()
loadLocalProperties()
apply plugin: 'konan'
apply plugin: 'kotlin'
apply plugin: 'kotlin.native.build-tools-conventions'
@@ -1235,7 +1272,7 @@ dynamicTest("interop_kotlin_exception_hook") {
}
standaloneTest("kt51302") {
enabled = project.target.name == project.hostName
enabled = project.target.name == PlatformInfo.hostName
source = "serialization/KT-51302/main.kt"
flags = ["-l", "$projectDir/serialization/KT-51302/kt51302_dependency"]
}