[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.
This commit is contained in:
committed by
Space
parent
064cffc89c
commit
b656d67bd4
+6
-6
@@ -25,7 +25,7 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testDefault() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
fun testDefault() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
||||||
build(":runDebugExecutableHost") {
|
build(":linkDebugExecutableHost") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
||||||
assertTrue(it.includesRegularJar())
|
assertTrue(it.includesRegularJar())
|
||||||
@@ -36,7 +36,7 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testEmbeddableJarFalse() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
fun testEmbeddableJarFalse() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
||||||
build(":runDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=false") {
|
build(":linkDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=false") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
||||||
assertTrue(it.includesRegularJar())
|
assertTrue(it.includesRegularJar())
|
||||||
@@ -47,7 +47,7 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testEmbeddableJarTrue() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
fun testEmbeddableJarTrue() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
||||||
build(":runDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") {
|
build(":linkDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
||||||
assertFalse(it.includesRegularJar())
|
assertFalse(it.includesRegularJar())
|
||||||
@@ -58,7 +58,7 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testSwitch() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
fun testSwitch() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
||||||
build(":runDebugExecutableHost") {
|
build(":linkDebugExecutableHost") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
||||||
assertTrue(it.includesRegularJar())
|
assertTrue(it.includesRegularJar())
|
||||||
@@ -66,11 +66,11 @@ class NativeEmbeddableCompilerJarIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
build(":runDebugExecutableHost") {
|
build(":linkDebugExecutableHost") {
|
||||||
assertTasksUpToDate(":linkDebugExecutableHost", ":compileKotlinHost")
|
assertTasksUpToDate(":linkDebugExecutableHost", ":compileKotlinHost")
|
||||||
}
|
}
|
||||||
|
|
||||||
build(":runDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") {
|
build(":linkDebugExecutableHost", "-Pkotlin.native.useEmbeddableCompilerJar=true") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertTasksExecuted(":linkDebugExecutableHost", ":compileKotlinHost")
|
assertTasksExecuted(":linkDebugExecutableHost", ":compileKotlinHost")
|
||||||
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
checkNativeCompilerClasspath(":linkDebugExecutableHost", ":compileKotlinHost") {
|
||||||
|
|||||||
Reference in New Issue
Block a user