diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java index 2862fdcd3f8..f505f8b01b2 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinTestUtils.java @@ -103,6 +103,10 @@ public class KotlinTestUtils { private static final boolean PRINT_STACKTRACE_FOR_IGNORED_TESTS = Boolean.getBoolean("org.jetbrains.kotlin.print.stacktrace.for.ignored.tests"); + private static final boolean DONT_IGNORE_TESTS_WORKING_ON_COMPATIBLE_BACKEND = + Boolean.getBoolean("org.jetbrains.kotlin.dont.ignore.tests.working.on.compatible.backend"); + + private static final boolean AUTOMATICALLY_UNMUTE_PASSED_TESTS = true; private static final boolean AUTOMATICALLY_MUTE_FAILED_TESTS = false; @@ -1043,6 +1047,13 @@ public class KotlinTestUtils { boolean isIgnored = isIgnoredTarget(targetBackend, testDataFile); + if (DONT_IGNORE_TESTS_WORKING_ON_COMPATIBLE_BACKEND) { + // Only ignore if it is ignored for both backends + // Motivation: this backend works => all good, even if compatible backend fails + // This backend fails, compatible works => need to know + isIgnored &= isIgnoredTarget(targetBackend.getCompatibleWith(), testDataFile); + } + try { test.invoke(testDataFilePath); }