From f8dabc79c3906e6e9afa0fe2e4a1cb89dee903a2 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 23 May 2017 18:07:32 +0300 Subject: [PATCH] Use environment variable JDK_19 instead of JDK_9 JDK_19 is set on TeamCity agents, not JDK_9. Also do not invoke getJreHome() because Java 9 distribution does not have a "jre" subdirectory --- .../org/jetbrains/kotlin/test/KotlinTestUtils.java | 6 +++--- .../tests-common/org/jetbrains/kotlin/test/TestJdkKind.java | 2 +- .../kotlin/checkers/AbstractDiagnosticsWithJdk9Test.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/tests-common/org/jetbrains/kotlin/test/KotlinTestUtils.java b/compiler/tests-common/org/jetbrains/kotlin/test/KotlinTestUtils.java index 0e66ff8b3ab..4c0e4b37521 100644 --- a/compiler/tests-common/org/jetbrains/kotlin/test/KotlinTestUtils.java +++ b/compiler/tests-common/org/jetbrains/kotlin/test/KotlinTestUtils.java @@ -497,12 +497,12 @@ public class KotlinTestUtils { JvmContentRootsKt.addJvmClasspathRoots(configuration, PathUtil.getJdkClassesRootsFromJre(getJreHome(jdk6))); } else if (jdkKind == TestJdkKind.FULL_JDK_9) { - String jdk9 = System.getenv("JDK_9"); + String jdk9 = System.getenv("JDK_19"); if (jdk9 != null) { - configuration.put(JVMConfigurationKeys.JDK_HOME, new File(getJreHome(jdk9))); + configuration.put(JVMConfigurationKeys.JDK_HOME, new File(jdk9)); } else { - System.err.println("Environment variable JDK_9 is not set, the test will be skipped"); + System.err.println("Environment variable JDK_19 is not set, the test will be skipped"); } } else { diff --git a/compiler/tests-common/org/jetbrains/kotlin/test/TestJdkKind.java b/compiler/tests-common/org/jetbrains/kotlin/test/TestJdkKind.java index 701ff5ecbc5..e29fcd46cc1 100644 --- a/compiler/tests-common/org/jetbrains/kotlin/test/TestJdkKind.java +++ b/compiler/tests-common/org/jetbrains/kotlin/test/TestJdkKind.java @@ -23,7 +23,7 @@ public enum TestJdkKind { MODIFIED_MOCK_JDK, // JDK found at $JDK_16 FULL_JDK_6, - // JDK found at $JDK_9 + // JDK found at $JDK_19 FULL_JDK_9, // JDK found at java.home FULL_JDK, diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsWithJdk9Test.java b/compiler/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsWithJdk9Test.java index 5ff32218e4f..19d23cbc907 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsWithJdk9Test.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsWithJdk9Test.java @@ -43,8 +43,8 @@ public abstract class AbstractDiagnosticsWithJdk9Test extends AbstractDiagnostic @NotNull Map modules, @NotNull List testFiles ) { - if (System.getenv("JDK_9") == null) { - // Skip this test if no environment variable JDK_9 is set up + if (System.getenv("JDK_19") == null) { + // Skip this test if no environment variable JDK_19 is set up return; } super.doMultiFileTest(file, modules, testFiles);