Fix KGP integration tests tasks run tests with other tags

Before this change specific test task (for example 'kgpJvmTests') will
run also test cases that included into test class annotated with
"JvmKGP" tag, but test case itself annotated with, for example,
"OtherKGP". Now specific test tasks should only run tests for given test
 tag.
This commit is contained in:
Yahor Berdnikau
2023-02-21 11:31:35 +01:00
committed by Space Team
parent 9a865e4c55
commit ff22f456a0
@@ -241,6 +241,7 @@ val jvmTestsTask = tasks.register<Test>("kgpJvmTests") {
maxParallelForks = maxParallelTestForks maxParallelForks = maxParallelTestForks
useJUnitPlatform { useJUnitPlatform {
includeTags("JvmKGP") includeTags("JvmKGP")
excludeTags("JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP")
includeEngines("junit-jupiter") includeEngines("junit-jupiter")
} }
} }
@@ -251,6 +252,7 @@ val jsTestsTask = tasks.register<Test>("kgpJsTests") {
maxParallelForks = maxParallelTestForks maxParallelForks = maxParallelTestForks
useJUnitPlatform { useJUnitPlatform {
includeTags("JsKGP") includeTags("JsKGP")
excludeTags("JvmKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP")
includeEngines("junit-jupiter") includeEngines("junit-jupiter")
} }
} }
@@ -261,6 +263,7 @@ val nativeTestsTask = tasks.register<Test>("kgpNativeTests") {
maxParallelForks = maxParallelTestForks maxParallelForks = maxParallelTestForks
useJUnitPlatform { useJUnitPlatform {
includeTags("NativeKGP") includeTags("NativeKGP")
excludeTags("JvmKGP", "JsKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP")
includeEngines("junit-jupiter") includeEngines("junit-jupiter")
} }
} }
@@ -273,6 +276,7 @@ val daemonsTestsTask = tasks.register<Test>("kgpDaemonTests") {
useJUnitPlatform { useJUnitPlatform {
includeTags("DaemonsKGP") includeTags("DaemonsKGP")
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "OtherKGP", "MppKGP", "AndroidKGP")
includeEngines("junit-jupiter") includeEngines("junit-jupiter")
} }
} }
@@ -283,6 +287,7 @@ val otherPluginsTestTask = tasks.register<Test>("kgpOtherTests") {
maxParallelForks = maxParallelTestForks maxParallelForks = maxParallelTestForks
useJUnitPlatform { useJUnitPlatform {
includeTags("OtherKGP") includeTags("OtherKGP")
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "MppKGP", "AndroidKGP")
includeEngines("junit-jupiter") includeEngines("junit-jupiter")
} }
} }
@@ -293,6 +298,7 @@ val mppTestsTask = tasks.register<Test>("kgpMppTests") {
maxParallelForks = maxParallelTestForks maxParallelForks = maxParallelTestForks
useJUnitPlatform { useJUnitPlatform {
includeTags("MppKGP") includeTags("MppKGP")
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "AndroidKGP")
includeEngines("junit-jupiter") includeEngines("junit-jupiter")
} }
} }
@@ -303,6 +309,7 @@ val androidTestsTask = tasks.register<Test>("kgpAndroidTests") {
maxParallelForks = maxParallelTestForks maxParallelForks = maxParallelTestForks
useJUnitPlatform { useJUnitPlatform {
includeTags("AndroidKGP") includeTags("AndroidKGP")
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP")
includeEngines("junit-jupiter") includeEngines("junit-jupiter")
} }
} }