diff --git a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/D8Checker.java b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/D8Checker.java index 4849709db52..569b6e74a49 100644 --- a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/D8Checker.java +++ b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/D8Checker.java @@ -20,12 +20,14 @@ import java.util.function.Consumer; public class D8Checker { - public static final boolean RUN_D8_CHECKER = true; + public static final boolean RUN_D8_CHECKER = !Boolean.valueOf(System.getProperty("kotlin.test.box.d8.disable")); private D8Checker() { } public static void check(ClassFileFactory outputFiles) { + if (!RUN_D8_CHECKER) return; + runD8(builder -> { for (OutputFile file : ClassFileUtilsKt.getClassFiles(outputFiles)) { byte[] bytes = file.asByteArray(); @@ -35,6 +37,7 @@ public class D8Checker { } public static void checkFilesWithD8(Collection> classFiles) { + if (!RUN_D8_CHECKER) return; runD8(builder -> { classFiles.forEach(pair -> { builder.addClassProgramData(pair.getFirst(), new PathOrigin(Paths.get(pair.getSecond()))); diff --git a/compiler/tests-different-jdk/build.gradle.kts b/compiler/tests-different-jdk/build.gradle.kts index 5165ec4b32f..80fe18fe35a 100644 --- a/compiler/tests-different-jdk/build.gradle.kts +++ b/compiler/tests-different-jdk/build.gradle.kts @@ -93,6 +93,7 @@ codegenTest(target = 8, jvm = 15) { codegenTest(target = 15, jvm = 15) { jvmArgs!!.add( "-XX:-FailOverToOldVerifier") + systemProperty("kotlin.test.box.d8.disable", true) } //..also add this two tasks to build after adding fresh jdks to build agents @@ -112,6 +113,9 @@ codegenTest( targetInTestClass = "Last", jvm = "Last", jdk = mostRecentJdk -) {} +) { + jvmArgs!!.add( "-XX:-FailOverToOldVerifier") + systemProperty("kotlin.test.box.d8.disable", true) +} testsJar()