diff --git a/native/native.tests/tests/org/jetbrains/kotlin/generators/tests/GenerateNativeTests.kt b/native/native.tests/tests/org/jetbrains/kotlin/generators/tests/GenerateNativeTests.kt index b11e37476f3..615be9794a0 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/generators/tests/GenerateNativeTests.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/generators/tests/GenerateNativeTests.kt @@ -363,7 +363,7 @@ fun main() { testGroup("plugins/atomicfu/atomicfu-compiler/test", "plugins/atomicfu/atomicfu-compiler/testData") { testClass( suiteTestClassName = "AtomicfuNativeTestGenerated", - annotations = listOf(atomicfuNative(), provider()) + annotations = listOf(*atomicfuNative(), provider()) ) { model("nativeBox") } @@ -559,7 +559,10 @@ private fun debugger() = annotation(Tag::class.java, "debugger") private fun infrastructure() = annotation(Tag::class.java, "infrastructure") private fun k1libContents() = annotation(Tag::class.java, "k1libContents") private fun k2libContents() = annotation(Tag::class.java, "k2libContents") -private fun atomicfuNative() = annotation(Tag::class.java, "atomicfu-native") +private fun atomicfuNative() = arrayOf( + annotation(Tag::class.java, "atomicfu-native"), + annotation(EnforcedHostTarget::class.java), // TODO(KT-65977): Make atomicfu tests run on all targets. +) private fun standalone() = arrayOf( annotation(Tag::class.java, "standalone"), annotation( diff --git a/plugins/atomicfu/atomicfu-compiler/test/org/jetbrains/kotlin/konan/test/blackbox/AtomicfuNativeTestGenerated.java b/plugins/atomicfu/atomicfu-compiler/test/org/jetbrains/kotlin/konan/test/blackbox/AtomicfuNativeTestGenerated.java index a399dc571a9..1f7573080e7 100644 --- a/plugins/atomicfu/atomicfu-compiler/test/org/jetbrains/kotlin/konan/test/blackbox/AtomicfuNativeTestGenerated.java +++ b/plugins/atomicfu/atomicfu-compiler/test/org/jetbrains/kotlin/konan/test/blackbox/AtomicfuNativeTestGenerated.java @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.konan.test.blackbox; import com.intellij.testFramework.TestDataPath; import org.jetbrains.kotlin.test.util.KtTestUtil; import org.junit.jupiter.api.Tag; +import org.jetbrains.kotlin.konan.test.blackbox.support.EnforcedHostTarget; import org.jetbrains.kotlin.konan.test.blackbox.support.group.UseStandardTestCaseGroupProvider; import org.jetbrains.kotlin.test.TestMetadata; import org.junit.jupiter.api.Nested; @@ -21,6 +22,7 @@ import java.util.regex.Pattern; @TestMetadata("plugins/atomicfu/atomicfu-compiler/testData/nativeBox") @TestDataPath("$PROJECT_ROOT") @Tag("atomicfu-native") +@EnforcedHostTarget() @UseStandardTestCaseGroupProvider() public class AtomicfuNativeTestGenerated extends AbstractNativeBlackBoxTest { @Test @@ -32,6 +34,7 @@ public class AtomicfuNativeTestGenerated extends AbstractNativeBlackBoxTest { @TestMetadata("plugins/atomicfu/atomicfu-compiler/testData/nativeBox/atomic_extensions") @TestDataPath("$PROJECT_ROOT") @Tag("atomicfu-native") + @EnforcedHostTarget() @UseStandardTestCaseGroupProvider() public class Atomic_extensions { @Test @@ -104,6 +107,7 @@ public class AtomicfuNativeTestGenerated extends AbstractNativeBlackBoxTest { @TestMetadata("plugins/atomicfu/atomicfu-compiler/testData/nativeBox/atomics_basic") @TestDataPath("$PROJECT_ROOT") @Tag("atomicfu-native") + @EnforcedHostTarget() @UseStandardTestCaseGroupProvider() public class Atomics_basic { @Test @@ -194,6 +198,7 @@ public class AtomicfuNativeTestGenerated extends AbstractNativeBlackBoxTest { @TestMetadata("plugins/atomicfu/atomicfu-compiler/testData/nativeBox/delegated") @TestDataPath("$PROJECT_ROOT") @Tag("atomicfu-native") + @EnforcedHostTarget() @UseStandardTestCaseGroupProvider() public class Delegated { @Test @@ -212,6 +217,7 @@ public class AtomicfuNativeTestGenerated extends AbstractNativeBlackBoxTest { @TestMetadata("plugins/atomicfu/atomicfu-compiler/testData/nativeBox/locks") @TestDataPath("$PROJECT_ROOT") @Tag("atomicfu-native") + @EnforcedHostTarget() @UseStandardTestCaseGroupProvider() public class Locks { @Test @@ -236,6 +242,7 @@ public class AtomicfuNativeTestGenerated extends AbstractNativeBlackBoxTest { @TestMetadata("plugins/atomicfu/atomicfu-compiler/testData/nativeBox/top-level") @TestDataPath("$PROJECT_ROOT") @Tag("atomicfu-native") + @EnforcedHostTarget() @UseStandardTestCaseGroupProvider() public class Top_level { @Test @@ -260,6 +267,7 @@ public class AtomicfuNativeTestGenerated extends AbstractNativeBlackBoxTest { @TestMetadata("plugins/atomicfu/atomicfu-compiler/testData/nativeBox/trace") @TestDataPath("$PROJECT_ROOT") @Tag("atomicfu-native") + @EnforcedHostTarget() @UseStandardTestCaseGroupProvider() public class Trace { @Test