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:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -43,8 +43,8 @@ public abstract class AbstractDiagnosticsWithJdk9Test extends AbstractDiagnostic
|
||||
@NotNull Map<String, ModuleAndDependencies> modules,
|
||||
@NotNull List<TestFile> 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);
|
||||
|
||||
Reference in New Issue
Block a user