From f9ea353b60afb6bd81f7545b550603e9d5e801a5 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Thu, 11 Jan 2024 17:44:48 +0200 Subject: [PATCH] [Native] Don't group K2 MPP tests in Native codegen tests K2 in MPP compilation expects that it receives module structure with exactly one platform leaf module. This invariant may be broken during grouping tests, so MPP tests should be run in standalone mode --- .../test/blackbox/support/group/ExtTestCaseGroupProvider.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/group/ExtTestCaseGroupProvider.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/group/ExtTestCaseGroupProvider.kt index 54cabb43dcb..2477a54d6a8 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/group/ExtTestCaseGroupProvider.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/group/ExtTestCaseGroupProvider.kt @@ -207,6 +207,12 @@ private class ExtTestDataFile( directives.contains(IGNORE_NATIVE_K2.name) ) return true + /** + * K2 in MPP compilation expects that it receives module structure with exactly one platform leaf module + * This invariant may be broken during grouping tests, so MPP tests should be run in standalone mode + */ + if (pipelineType != PipelineType.K1 && testDataFileSettings.languageSettings.contains("+MultiPlatformProjects")) return true + var isStandaloneTest = false filesToTransform.forEach { handler ->