From a4730dd57e17c15752351379a6ddaf25a034e036 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 29 Jul 2021 15:41:16 +0200 Subject: [PATCH] Minor, set JAVA_HOME to JDK 1.8 in LauncherScriptTest Otherwise the test would invoke the "java" executable from PATH, which might not be 1.8, and that would cause some tests to fail because error messages are slightly different in newer Java versions. --- compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt b/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt index 745e7754daf..55cc255baa6 100644 --- a/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/cli/LauncherScriptTest.kt @@ -34,7 +34,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() { expectedStderr: String = "", expectedExitCode: Int = 0, workDirectory: File? = null, - environment: Map = emptyMap(), + environment: Map = mapOf("JAVA_HOME" to KtTestUtil.getJdk8Home().absolutePath), ) { val executableFileName = if (SystemInfo.isWindows) "$executableName.bat" else executableName val launcherFile = File(PathUtil.kotlinPathsForDistDirectory.homePath, "bin/$executableFileName")