From 3757bd0c1f90eb004230d1adcec958aed912bdd6 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Mon, 5 Apr 2021 18:50:12 +0300 Subject: [PATCH] Use environment variable for getting TEAMCITY_VERSION --- .../jetbrains/kotlin/test/utils/FirIdenticalCheckerHelper.kt | 2 +- generators/main/GeneratorsFileUtil.kt | 2 +- .../tests/org/jetbrains/kotlin/test/uitls/IgnoreTests.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FirIdenticalCheckerHelper.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FirIdenticalCheckerHelper.kt index cc730bdf849..635badf03d7 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FirIdenticalCheckerHelper.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FirIdenticalCheckerHelper.kt @@ -12,7 +12,7 @@ import java.io.File abstract class FirIdenticalCheckerHelper(private val testServices: TestServices) { companion object { - private val isTeamCityBuild: Boolean = System.getProperty("TEAMCITY_VERSION") != null + private val isTeamCityBuild: Boolean = System.getenv("TEAMCITY_VERSION") != null } abstract fun getClassicFileToCompare(testDataFile: File): File? diff --git a/generators/main/GeneratorsFileUtil.kt b/generators/main/GeneratorsFileUtil.kt index b1073fb75e9..9897187c925 100644 --- a/generators/main/GeneratorsFileUtil.kt +++ b/generators/main/GeneratorsFileUtil.kt @@ -11,7 +11,7 @@ import java.io.IOException import kotlin.io.path.* object GeneratorsFileUtil { - val isTeamCityBuild: Boolean = System.getProperty("TEAMCITY_VERSION") != null + val isTeamCityBuild: Boolean = System.getenv("TEAMCITY_VERSION") != null @OptIn(ExperimentalPathApi::class) @JvmStatic diff --git a/idea/idea-frontend-independent/tests/org/jetbrains/kotlin/test/uitls/IgnoreTests.kt b/idea/idea-frontend-independent/tests/org/jetbrains/kotlin/test/uitls/IgnoreTests.kt index cf8cc21346d..f87e461ec40 100644 --- a/idea/idea-frontend-independent/tests/org/jetbrains/kotlin/test/uitls/IgnoreTests.kt +++ b/idea/idea-frontend-independent/tests/org/jetbrains/kotlin/test/uitls/IgnoreTests.kt @@ -188,7 +188,7 @@ object IgnoreTests { } private val isTeamCityBuild: Boolean - get() = System.getProperty("TEAMCITY_VERSION") != null + get() = System.getenv("TEAMCITY_VERSION") != null || KtUsefulTestCase.IS_UNDER_TEAMCITY