Skip to content

Commit d87b909

Browse files
demiurg906Space Team
authored andcommitted
[Build] Don't pass empty test data roots property to tests
1 parent f78eda6 commit d87b909

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/services/SystemPropertyTestDataRootConfigurator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.test.services
88
import org.jetbrains.kotlin.codegen.forTestCompile.TestCompilePaths.KOTLIN_TESTDATA_ROOTS
99

1010
class SystemPropertyTestDataRootConfigurator(testServices: TestServices) : MetaTestConfigurator(testServices) {
11-
private val testDataRoots = System.getProperty(KOTLIN_TESTDATA_ROOTS)?.let { property ->
11+
private val testDataRoots: Map<String, String>? = System.getProperty(KOTLIN_TESTDATA_ROOTS)?.let { property ->
1212
buildMap {
1313
val roots = property.split(";")
1414
for (root in roots) {

repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/TestCompilerRuntimeArgumentProvider.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ abstract class TestCompilerRuntimeArgumentProvider : CommandLineArgumentProvider
145145
thirdPartyJava8Annotations.orNull?.let { "-D$KOTLIN_THIRDPARTY_JAVA8_ANNOTATIONS_PATH=${it.asFile.absolutePath}" },
146146
thirdPartyJava9Annotations.orNull?.let { "-D$KOTLIN_THIRDPARTY_JAVA9_ANNOTATIONS_PATH=${it.asFile.absolutePath}" },
147147
thirdPartyJsr305.orNull?.let { "-D$KOTLIN_THIRDPARTY_JSR305_PATH=${it.asFile.absolutePath}" },
148-
testDataMap.get().map { it.key + "=" + it.value }.joinToString(prefix = "-D$KOTLIN_TESTDATA_ROOTS=", separator = ";"),
148+
testDataMap.get().takeIf { it.isNotEmpty() }
149+
?.map { it.key + "=" + it.value }
150+
?.joinToString(prefix = "-D$KOTLIN_TESTDATA_ROOTS=", separator = ";"),
149151
)
150152
}
151-
}
153+
}

0 commit comments

Comments
 (0)