KT-65582 Add Swift export test tags
This commit is contained in:
committed by
Space Team
parent
f1c7f929d2
commit
6ed6e7ce28
@@ -291,7 +291,18 @@ val jvmTestsTask = tasks.register<Test>("kgpJvmTests") {
|
||||
maxParallelForks = maxParallelTestForks
|
||||
useJUnitPlatform {
|
||||
includeTags("JvmKGP")
|
||||
excludeTags("JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP")
|
||||
excludeTags("JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP", "SwiftExportKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
}
|
||||
|
||||
val swiftExportTestsTask = tasks.register<Test>("kgpSwiftExportTests") {
|
||||
group = KGP_TEST_TASKS_GROUP
|
||||
description = "Run Swift Export Kotlin Gradle plugin tests"
|
||||
maxParallelForks = maxParallelTestForks
|
||||
useJUnitPlatform {
|
||||
includeTags("SwiftExportKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP", "NativeKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
}
|
||||
@@ -302,7 +313,7 @@ val jsTestsTask = tasks.register<Test>("kgpJsTests") {
|
||||
maxParallelForks = maxParallelTestForks
|
||||
useJUnitPlatform {
|
||||
includeTags("JsKGP")
|
||||
excludeTags("JvmKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP")
|
||||
excludeTags("JvmKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP", "SwiftExportKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
}
|
||||
@@ -313,7 +324,7 @@ val nativeTestsTask = tasks.register<Test>("kgpNativeTests") {
|
||||
maxParallelForks = maxParallelTestForks
|
||||
useJUnitPlatform {
|
||||
includeTags("NativeKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "AndroidKGP", "SwiftExportKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
applyKotlinNativeFromCurrentBranchIfNeeded()
|
||||
@@ -327,7 +338,7 @@ val daemonsTestsTask = tasks.register<Test>("kgpDaemonTests") {
|
||||
|
||||
useJUnitPlatform {
|
||||
includeTags("DaemonsKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "OtherKGP", "MppKGP", "AndroidKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "OtherKGP", "MppKGP", "AndroidKGP", "SwiftExportKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
}
|
||||
@@ -338,7 +349,7 @@ val otherPluginsTestTask = tasks.register<Test>("kgpOtherTests") {
|
||||
maxParallelForks = maxParallelTestForks
|
||||
useJUnitPlatform {
|
||||
includeTags("OtherKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "MppKGP", "AndroidKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "MppKGP", "AndroidKGP", "SwiftExportKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
applyKotlinNativeFromCurrentBranchIfNeeded()
|
||||
@@ -350,7 +361,7 @@ val mppTestsTask = tasks.register<Test>("kgpMppTests") {
|
||||
maxParallelForks = maxParallelTestForks
|
||||
useJUnitPlatform {
|
||||
includeTags("MppKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "AndroidKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "AndroidKGP", "SwiftExportKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
applyKotlinNativeFromCurrentBranchIfNeeded()
|
||||
@@ -362,7 +373,7 @@ val androidTestsTask = tasks.register<Test>("kgpAndroidTests") {
|
||||
maxParallelForks = maxParallelTestForks
|
||||
useJUnitPlatform {
|
||||
includeTags("AndroidKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP")
|
||||
excludeTags("JvmKGP", "JsKGP", "NativeKGP", "DaemonsKGP", "OtherKGP", "MppKGP", "SwiftExportKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
}
|
||||
@@ -428,6 +439,7 @@ tasks.withType<Test> {
|
||||
allParallelTestsTask.name,
|
||||
jvmTestsTask.name,
|
||||
jsTestsTask.name,
|
||||
swiftExportTestsTask.name,
|
||||
nativeTestsTask.name,
|
||||
daemonsTestsTask.name,
|
||||
otherPluginsTestTask.name,
|
||||
|
||||
+2
-1
@@ -58,6 +58,7 @@ class TagsCountValidatorInterceptor : InvocationInterceptor {
|
||||
it is NativeGradlePluginTests ||
|
||||
it is MppGradlePluginTests ||
|
||||
it is AndroidGradlePluginTests ||
|
||||
it is OtherGradlePluginTests
|
||||
it is OtherGradlePluginTests ||
|
||||
it is SwiftExportGradlePluginTests
|
||||
}
|
||||
}
|
||||
+12
@@ -55,6 +55,18 @@ annotation class JsGradlePluginTests
|
||||
@Tag("NativeKGP")
|
||||
annotation class NativeGradlePluginTests
|
||||
|
||||
/**
|
||||
* Add it to tests covering Swift Export Kotlin Gradle Plugin/Native platform.
|
||||
*
|
||||
* You could add tag onto test suite once, but then all tests
|
||||
* in test suite should be for the related tag.
|
||||
* Preferably add tag for each test.
|
||||
*/
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.FUNCTION)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@Tag("SwiftExportKGP")
|
||||
annotation class SwiftExportGradlePluginTests
|
||||
|
||||
/**
|
||||
* Add it to tests covering Kotlin Multiplatform Gradle plugin.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user