[K/N][tests] Support tag expressions for :native:native.tests:test

This commits adds a Gradle project property 'kotlin.native.tests.tags',
which can be used when running :native:native.tests:test task to filter
tests by tags. The property value can contain an arbitrary JUnit tag
expression. See
https://junit.org/junit5/docs/current/user-guide/#running-tests-tag-expressions
for more details.
This commit is contained in:
Svyatoslav Scherbina
2023-02-15 16:18:36 +01:00
committed by Space Team
parent 74c39df0d8
commit ec59cc050c
+4 -1
View File
@@ -55,7 +55,10 @@ val cachesTest = nativeTest("cachesTest", "caches")
val k1libContentsTest = nativeTest("k1libContentsTest", "k1libContents")
val k2libContentsTest = nativeTest("k2libContentsTest", "k2libContents")
val test by nativeTest("test", null /* no tags */)
val testTags = findProperty("kotlin.native.tests.tags")?.toString()
// Note: arbitrary JUnit tag expressions can be used in this property.
// See https://junit.org/junit5/docs/current/user-guide/#running-tests-tag-expressions
val test by nativeTest("test", testTags)
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateNativeTestsKt") {
javaLauncher.set(project.getToolchainLauncherFor(JdkMajorVersion.JDK_11_0))