From 9ecf416a8a80578bc87816bbc1ec49c8817eda0f Mon Sep 17 00:00:00 2001 From: Yunir Salimzyanov Date: Thu, 13 Aug 2020 10:50:04 +0300 Subject: [PATCH] Parse multiple buildTypeIds for one bunch and synchronize muted tests Cause: split Ide plugin tests in 4 parts --- .../src/org/jetbrains/kotlin/test/mutes/MutedTestsSync.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/tests-mutes/src/org/jetbrains/kotlin/test/mutes/MutedTestsSync.kt b/compiler/tests-mutes/src/org/jetbrains/kotlin/test/mutes/MutedTestsSync.kt index 10dbf77f8d1..70772272a60 100644 --- a/compiler/tests-mutes/src/org/jetbrains/kotlin/test/mutes/MutedTestsSync.kt +++ b/compiler/tests-mutes/src/org/jetbrains/kotlin/test/mutes/MutedTestsSync.kt @@ -24,8 +24,10 @@ fun syncMutedTestsOnTeamCityWithDatabase() { syncMutedTests(remotelyMutedTests.projectTests, locallyMutedTests.projectTests) for ((originalBunchId, foundBunchId) in bunches) { - getBuildTypeId(originalBunchId)?.let { buildTypeId -> - syncMutedTests(remotelyMutedTests.getTestsJson(buildTypeId), locallyMutedTests.getTestsJson(foundBunchId, buildTypeId)) + getBuildTypeIds(originalBunchId)?.let { buildTypeIds -> + for (buildTypeId in buildTypeIds.split(",")) { + syncMutedTests(remotelyMutedTests.getTestsJson(buildTypeId), locallyMutedTests.getTestsJson(foundBunchId, buildTypeId)) + } } } } @@ -70,7 +72,7 @@ object Bunches { private const val mutesPackageName = "org.jetbrains.kotlin.test.mutes" internal val projectId = getMandatoryProperty("$mutesPackageName.tests.project.id") -internal fun getBuildTypeId(bunchId: String) = System.getProperty("$mutesPackageName.$bunchId") +internal fun getBuildTypeIds(bunchId: String) = System.getProperty("$mutesPackageName.$bunchId") class RemotelyMutedTests { val tests = getMutedTestsOnTeamcityForRootProject(projectId)