[Native][tests] Optionally, run tests with the dependency on K/N platform libs
This commit is contained in:
@@ -74,6 +74,7 @@ private fun Test.ComputedTestProperties(init: ComputedTestProperties.() -> Unit)
|
|||||||
fun Project.nativeTest(
|
fun Project.nativeTest(
|
||||||
taskName: String,
|
taskName: String,
|
||||||
tag: String?,
|
tag: String?,
|
||||||
|
requirePlatformLibs: Boolean = false,
|
||||||
customDependencies: List<Configuration> = emptyList(),
|
customDependencies: List<Configuration> = emptyList(),
|
||||||
customKlibDependencies: List<Configuration> = emptyList()
|
customKlibDependencies: List<Configuration> = emptyList()
|
||||||
) = projectTest(
|
) = projectTest(
|
||||||
@@ -113,7 +114,13 @@ fun Project.nativeTest(
|
|||||||
val computedTestProperties = ComputedTestProperties {
|
val computedTestProperties = ComputedTestProperties {
|
||||||
compute(KOTLIN_NATIVE_HOME) {
|
compute(KOTLIN_NATIVE_HOME) {
|
||||||
val testTarget = readFromGradle(TEST_TARGET)
|
val testTarget = readFromGradle(TEST_TARGET)
|
||||||
dependsOn(if (testTarget != null) ":kotlin-native:${testTarget}CrossDist" else ":kotlin-native:dist")
|
if (testTarget != null) {
|
||||||
|
dependsOn(":kotlin-native:${testTarget}CrossDist")
|
||||||
|
if (requirePlatformLibs) dependsOn(":kotlin-native:${testTarget}PlatformLibs")
|
||||||
|
} else {
|
||||||
|
dependsOn(":kotlin-native:dist")
|
||||||
|
if (requirePlatformLibs) dependsOn(":kotlin-native:distPlatformLibs")
|
||||||
|
}
|
||||||
project(":kotlin-native").projectDir.resolve("dist").absolutePath
|
project(":kotlin-native").projectDir.resolve("dist").absolutePath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user