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
This commit is contained in:
Alexander Udalov
2017-05-23 18:07:32 +03:00
parent c8e58ce9ab
commit f8dabc79c3
3 changed files with 6 additions and 6 deletions
@@ -497,12 +497,12 @@ public class KotlinTestUtils {
JvmContentRootsKt.addJvmClasspathRoots(configuration, PathUtil.getJdkClassesRootsFromJre(getJreHome(jdk6))); JvmContentRootsKt.addJvmClasspathRoots(configuration, PathUtil.getJdkClassesRootsFromJre(getJreHome(jdk6)));
} }
else if (jdkKind == TestJdkKind.FULL_JDK_9) { else if (jdkKind == TestJdkKind.FULL_JDK_9) {
String jdk9 = System.getenv("JDK_9"); String jdk9 = System.getenv("JDK_19");
if (jdk9 != null) { if (jdk9 != null) {
configuration.put(JVMConfigurationKeys.JDK_HOME, new File(getJreHome(jdk9))); configuration.put(JVMConfigurationKeys.JDK_HOME, new File(jdk9));
} }
else { 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 { else {
@@ -23,7 +23,7 @@ public enum TestJdkKind {
MODIFIED_MOCK_JDK, MODIFIED_MOCK_JDK,
// JDK found at $JDK_16 // JDK found at $JDK_16
FULL_JDK_6, FULL_JDK_6,
// JDK found at $JDK_9 // JDK found at $JDK_19
FULL_JDK_9, FULL_JDK_9,
// JDK found at java.home // JDK found at java.home
FULL_JDK, FULL_JDK,
@@ -43,8 +43,8 @@ public abstract class AbstractDiagnosticsWithJdk9Test extends AbstractDiagnostic
@NotNull Map<String, ModuleAndDependencies> modules, @NotNull Map<String, ModuleAndDependencies> modules,
@NotNull List<TestFile> testFiles @NotNull List<TestFile> testFiles
) { ) {
if (System.getenv("JDK_9") == null) { if (System.getenv("JDK_19") == null) {
// Skip this test if no environment variable JDK_9 is set up // Skip this test if no environment variable JDK_19 is set up
return; return;
} }
super.doMultiFileTest(file, modules, testFiles); super.doMultiFileTest(file, modules, testFiles);