diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/StdlibTest.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/StdlibTest.kt index 2c01b12ca00..f3abdb99f1d 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/StdlibTest.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/StdlibTest.kt @@ -27,7 +27,8 @@ import org.junit.jupiter.api.TestFactory "kotlin-native/backend.native/tests/stdlib_external/text/**.kt", "kotlin-native/backend.native/tests/stdlib_external/utils.kt", "kotlin-native/backend.native/tests/stdlib_external/jsCollectionFactoriesActuals.kt" - ] + ], + ignoredTests = [DISABLED_STDLIB_TEST] ), TC( name = "nativeStdlibInWorker", @@ -39,7 +40,8 @@ import org.junit.jupiter.api.TestFactory "kotlin-native/backend.native/tests/stdlib_external/text/**.kt", "kotlin-native/backend.native/tests/stdlib_external/utils.kt", "kotlin-native/backend.native/tests/stdlib_external/jsCollectionFactoriesActuals.kt" - ] + ], + ignoredTests = [DISABLED_STDLIB_TEST] ), TC( name = "kotlinTest", @@ -71,3 +73,4 @@ class StdlibTest : AbstractNativeBlackBoxTest() { private const val ENABLE_MPP = "-Xmulti-platform" private const val STDLIB_IS_A_FRIEND = "-friend-modules=$KOTLIN_NATIVE_DISTRIBUTION/klib/common/stdlib" private const val ENABLE_X_STDLIB_API = "-opt-in=kotlin.RequiresOptIn,kotlin.ExperimentalStdlibApi" +private const val DISABLED_STDLIB_TEST = "test.collections.CollectionTest.abstractCollectionToArray" \ No newline at end of file diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/TestCase.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/TestCase.kt index 50ef7103d72..d42ac29a060 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/TestCase.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/TestCase.kt @@ -178,7 +178,7 @@ internal class TestCase( ) { sealed interface Extras class NoTestRunnerExtras(val entryPoint: String, val inputDataFile: File?) : Extras - class WithTestRunnerExtras(val runnerType: TestRunnerType) : Extras + class WithTestRunnerExtras(val runnerType: TestRunnerType, val ignoredTests: Set = emptySet()) : Extras init { when (kind) { diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/TestRunProvider.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/TestRunProvider.kt index 58f7cf6fa85..e0e4d0fe2ca 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/TestRunProvider.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/TestRunProvider.kt @@ -210,6 +210,8 @@ internal class TestRunProvider( private fun Collection.filterIrrelevant(testCase: TestCase) = if (testCase.kind == TestKind.REGULAR) filter { testName -> testName.packageName.startsWith(testCase.nominalPackageName) } + else if (testCase.extras is WithTestRunnerExtras) + filterNot { testName -> testCase.extras().ignoredTests.contains(testName.toString()) } else this diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCaseGroupProvider.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCaseGroupProvider.kt index 46607d548de..e5f0f156daf 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCaseGroupProvider.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCaseGroupProvider.kt @@ -62,7 +62,10 @@ internal class PredefinedTestCaseGroupProvider(annotation: PredefinedTestCases) .parseCompilerArgs(settings) { "Failed to parse free compiler arguments for test case $testCaseId" }, nominalPackageName = PackageName(testCaseId.uniqueName), expectedOutputDataFile = null, - extras = WithTestRunnerExtras(runnerType = predefinedTestCase.runnerType) + extras = WithTestRunnerExtras( + runnerType = predefinedTestCase.runnerType, + ignoredTests = predefinedTestCase.ignoredTests.toSet() + ) ) testCase.initialize(null) diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCases.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCases.kt index 58ddb9a2dee..262a99f23d4 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCases.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/support/group/PredefinedTestCases.kt @@ -17,7 +17,8 @@ internal annotation class PredefinedTestCase( val name: String, val runnerType: TestRunnerType, val freeCompilerArgs: Array, - val sourceLocations: Array + val sourceLocations: Array, + val ignoredTests: Array = [] ) internal object PredefinedPaths {