From b656d67bd4c6b06c399bd1fa576eb129dd8239b5 Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Fri, 17 Sep 2021 11:29:32 +0300 Subject: [PATCH] [Gradle, Native, IT] Workaround NativeEmbeddableCompilerJarIT on Apple silicon The tests fail on Apple silicon because Gradle plugin doesn't provide run tasks for macosArm64 (KT-48649). Workaround this by making the tests execute link task instead of run. --- .../gradle/native/NativeEmbeddableCompilerJarIT.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/NativeEmbeddableCompilerJarIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/NativeEmbeddableCompilerJarIT.kt index 85b6d67d197..6c35393fe46 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/NativeEmbeddableCompilerJarIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/NativeEmbeddableCompilerJarIT.kt @@ -25,7 +25,7 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() { @Test fun testDefault() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) { - build(":runDebugExecutableHost") { + build(":linkDebugExecutableHost") { assertSuccessful() checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") { assertTrue(it.includesRegularJar()) @@ -36,7 +36,7 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() { @Test fun testEmbeddableJarFalse() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) { - build(":runDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=false") { + build(":linkDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=false") { assertSuccessful() checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") { assertTrue(it.includesRegularJar()) @@ -47,7 +47,7 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() { @Test fun testEmbeddableJarTrue() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) { - build(":runDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") { + build(":linkDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") { assertSuccessful() checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") { assertFalse(it.includesRegularJar()) @@ -58,7 +58,7 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() { @Test fun testSwitch() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) { - build(":runDebugExecutableHost") { + build(":linkDebugExecutableHost") { assertSuccessful() checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") { assertTrue(it.includesRegularJar()) @@ -66,11 +66,11 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() { } } - build(":runDebugExecutableHost") { + build(":linkDebugExecutableHost") { assertTasksUpToDate(":linkDebugExecutableHost", ":compileKotlinHost") } - build(":runDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") { + build(":linkDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") { assertSuccessful() assertTasksExecuted(":linkDebugExecutableHost", ":compileKotlinHost") checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {