[K/N][tests] Move gradle stuff for old infra to old infra
This commit is contained in:
committed by
Space Team
parent
c818ce9220
commit
bb8c8431e8
@@ -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: 'konan'
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply plugin: 'kotlin.native.build-tools-conventions'
|
apply plugin: 'kotlin.native.build-tools-conventions'
|
||||||
@@ -1235,7 +1272,7 @@ dynamicTest("interop_kotlin_exception_hook") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
standaloneTest("kt51302") {
|
standaloneTest("kt51302") {
|
||||||
enabled = project.target.name == project.hostName
|
enabled = project.target.name == PlatformInfo.hostName
|
||||||
source = "serialization/KT-51302/main.kt"
|
source = "serialization/KT-51302/main.kt"
|
||||||
flags = ["-l", "$projectDir/serialization/KT-51302/kt51302_dependency"]
|
flags = ["-l", "$projectDir/serialization/KT-51302/kt51302_dependency"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,8 +88,6 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setupHostAndTarget()
|
setupHostAndTarget()
|
||||||
loadCommandLineProperties()
|
|
||||||
loadLocalProperties()
|
|
||||||
setupClang(project)
|
setupClang(project)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,40 +102,6 @@ void setupClang(Project project) {
|
|||||||
project.extensions.execClang = org.jetbrains.kotlin.ExecClang.create(project)
|
project.extensions.execClang = org.jetbrains.kotlin.ExecClang.create(project)
|
||||||
}
|
}
|
||||||
|
|
||||||
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 : ext.hostName
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
ftpAntTask
|
ftpAntTask
|
||||||
distPack
|
distPack
|
||||||
|
|||||||
@@ -596,7 +596,6 @@ konanArtifacts {
|
|||||||
noDefaultLibs(true)
|
noDefaultLibs(true)
|
||||||
noEndorsedLibs(true)
|
noEndorsedLibs(true)
|
||||||
|
|
||||||
extraOpts(project.globalBuildArgs)
|
|
||||||
extraOpts(
|
extraOpts(
|
||||||
"-Werror",
|
"-Werror",
|
||||||
"-Xexplicit-api=strict",
|
"-Xexplicit-api=strict",
|
||||||
|
|||||||
Reference in New Issue
Block a user