Add test tag and task for KGP MPP tests.

^KT-45749 In Progress
This commit is contained in:
Yahor Berdnikau
2021-11-24 16:42:19 +01:00
parent 91b1814b02
commit 2c7913627d
2 changed files with 23 additions and 2 deletions
@@ -246,9 +246,21 @@ val otherPluginsTestTask = tasks.register<Test>("kgpOtherTests") {
if (isTeamcityBuild) finalizedBy(cleanTestKitCacheTask)
}
val mppTestsTask = tasks.register<Test>("kgpMppTests") {
group = KGP_TEST_TASKS_GROUP
description = "Run Multiplatform Kotlin Gradle plugin tests"
maxParallelForks = maxParallelTestForks
useJUnitPlatform {
includeTags("MppKGP")
includeEngines("junit-jupiter")
}
if (isTeamcityBuild) finalizedBy(cleanTestKitCacheTask)
}
tasks.named<Task>("check") {
dependsOn("testAdvanceGradleVersion")
dependsOn(simpleTestsTask, jvmTestsTask, jsTestsTask, daemonsTestsTask, otherPluginsTestTask)
dependsOn(simpleTestsTask, jvmTestsTask, jsTestsTask, daemonsTestsTask, otherPluginsTestTask, mppTestsTask)
if (isTeamcityBuild) {
dependsOn("testAdvanceGradleVersionMppAndAndroid")
dependsOn("testMppAndAndroid")
@@ -301,7 +313,8 @@ tasks.withType<Test> {
jvmTestsTask.name,
jsTestsTask.name,
daemonsTestsTask.name,
otherPluginsTestTask.name
otherPluginsTestTask.name,
mppTestsTask.name
)
if (shouldApplyJunitPlatform) {
maxHeapSize = "512m"
@@ -39,6 +39,14 @@ annotation class JvmGradlePluginTests
@Tag("JsKGP")
annotation class JsGradlePluginTests
/**
* Add it to tests covering Kotlin Multiplatform Gradle plugin.
*/
@Target(AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
@Tag("MppKGP")
annotation class MppGradlePluginTests
@Target(AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
@Tag("OtherKGP")