diff --git a/compiler/testData/javaModules/releaseFlagWrongValue/module12.txt b/compiler/testData/javaModules/releaseFlagWrongValue/module12.txt index 9226ba47fda..89de59c269f 100644 --- a/compiler/testData/javaModules/releaseFlagWrongValue/module12.txt +++ b/compiler/testData/javaModules/releaseFlagWrongValue/module12.txt @@ -1,3 +1,3 @@ -error: can't find modules signatures in `ct.sym` file for `-Xjdk-release=12` in $JDK11/lib/ct.sym +error: can't find modules signatures in `ct.sym` file for `-Xjdk-release=12` in $JDK_11/lib/ct.sym error: module java.base cannot be found in the module graph COMPILATION_ERROR diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java b/compiler/tests-common/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java index 2b83e136c99..3b631196ce9 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java @@ -113,12 +113,15 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir { .replace(PathUtil.getKotlinPathsForDistDirectory().getHomePath().getParentFile().getAbsolutePath(), "$DIST_DIR$") .replace(org.jetbrains.kotlin.konan.file.File.Companion.getUserDir().getAbsolutePath(), "$USER_DIR$") .replace(tmpDirAbsoluteDir, "$TMP_DIR$") + .replace("\\", "/") + .replace(KtTestUtil.getJdk8Home().getAbsolutePath().replace("\\", "/"), "$JDK_1_8") + .replace(KtTestUtil.getJdk11Home().getAbsolutePath().replace("\\", "/"), "$JDK_11") + .replace(KtTestUtil.getJdk17Home().getAbsolutePath().replace("\\", "/"), "$JDK_17") .replaceAll("info: executable production duration: \\d+ms", "info: executable production duration: [time]") .replace(KotlinCompilerVersion.VERSION, "$VERSION$") .replace(" " + JvmMetadataVersion.INSTANCE, " $ABI_VERSION$") .replace(" " + JsMetadataVersion.INSTANCE, " $ABI_VERSION$") .replace(" " + JvmMetadataVersion.INSTANCE_NEXT, " $ABI_VERSION_NEXT$") - .replace("\\", "/") .replace("\n" + Usage.BAT_DELIMITER_CHARACTERS_NOTE + "\n", "") .replaceAll("log4j:WARN.*\n", ""); diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/modules/AbstractJavaModulesIntegrationTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/modules/AbstractJavaModulesIntegrationTest.kt index cd54e9fb4c9..4eef1e67a7e 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/modules/AbstractJavaModulesIntegrationTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/modules/AbstractJavaModulesIntegrationTest.kt @@ -70,15 +70,12 @@ abstract class AbstractJavaModulesIntegrationTest( ) } - private fun checkKotlinOutput(moduleName: String): (String) -> Unit { val expectedFirFile = File(testDataDirectory, "$moduleName.fir.txt") return { actual -> KotlinTestUtils.assertEqualsToFile( if (languageVersion.usesK2 && expectedFirFile.exists()) expectedFirFile else File(testDataDirectory, "$moduleName.txt"), getNormalizedCompilerOutput(actual, null, testDataPath, tmpdir.absolutePath) - .replace((System.getenv("JDK_11_0") ?: System.getenv("JDK_11")).replace("\\", "/"), "\$JDK11") - .replace((System.getenv("JDK_17_0") ?: System.getenv("JDK_17")).replace("\\", "/"), "\$JDK17") ) } }