Warn when running the compiler under Java 6 or 7
(cherry picked from commit 5537800) (cherry picked from commit 5614874)
This commit is contained in:
@@ -74,12 +74,13 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
|
||||
@NotNull BinaryVersion version
|
||||
) {
|
||||
String testDataAbsoluteDir = new File(testDataDir).getAbsolutePath();
|
||||
String normalizedOutputWithoutExitCode = pureOutput
|
||||
String normalizedOutputWithoutExitCode = StringUtil.convertLineSeparators(pureOutput)
|
||||
.replace(testDataAbsoluteDir, "$TESTDATA_DIR$")
|
||||
.replace(FileUtil.toSystemIndependentName(testDataAbsoluteDir), "$TESTDATA_DIR$")
|
||||
.replace(PathUtil.getKotlinPathsForDistDirectory().getHomePath().getAbsolutePath(), "$PROJECT_DIR$")
|
||||
.replace("expected version is " + version, "expected version is $ABI_VERSION$")
|
||||
.replace("\\", "/")
|
||||
.replaceAll("^.+running the Kotlin compiler under Java 6 or 7 is unsupported and will no longer be possible in a future update\\.\n", "")
|
||||
.replace(KotlinCompilerVersion.VERSION, "$VERSION$");
|
||||
|
||||
return normalizedOutputWithoutExitCode + exitCode;
|
||||
|
||||
@@ -43,6 +43,7 @@ public abstract class CompilerSmokeTestBase extends KotlinIntegrationTestBase {
|
||||
javaArgs.add("org.jetbrains.kotlin.cli.jvm.K2JVMCompiler");
|
||||
|
||||
Collections.addAll(javaArgs, arguments);
|
||||
javaArgs.add("-Xskip-java-check");
|
||||
|
||||
return run(logName, ArrayUtil.toStringArray(javaArgs));
|
||||
}
|
||||
|
||||
+3
-3
@@ -39,7 +39,7 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
||||
|
||||
val result = buildString {
|
||||
val (commonOutput, commonExitCode) = AbstractCliTest.executeCompilerGrabOutput(K2MetadataCompiler(), listOf(
|
||||
commonSrc.absolutePath, "-d", commonDest.absolutePath
|
||||
commonSrc.absolutePath, "-d", commonDest.absolutePath, "-Xskip-java-check"
|
||||
))
|
||||
appendln("-- Common --")
|
||||
appendln("Exit code: $commonExitCode")
|
||||
@@ -50,7 +50,7 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
||||
val (jvmOutput, jvmExitCode) = AbstractCliTest.executeCompilerGrabOutput(K2JVMCompiler(), listOf(
|
||||
jvmSrc.absolutePath, commonSrc.absolutePath,
|
||||
"-d", jvmDest.absolutePath,
|
||||
"-Xmulti-platform"
|
||||
"-Xmulti-platform", "-Xskip-java-check"
|
||||
))
|
||||
appendln("-- JVM --")
|
||||
appendln("Exit code: $jvmExitCode")
|
||||
@@ -62,7 +62,7 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
||||
val (jsOutput, jsExitCode) = AbstractCliTest.executeCompilerGrabOutput(K2JSCompiler(), listOf(
|
||||
jsSrc.absolutePath, commonSrc.absolutePath,
|
||||
"-output", jsDest.absolutePath,
|
||||
"-Xmulti-platform"
|
||||
"-Xmulti-platform", "-Xskip-java-check"
|
||||
))
|
||||
appendln("-- JS --")
|
||||
appendln("Exit code: $jsExitCode")
|
||||
|
||||
Reference in New Issue
Block a user