Skip to content

Commit

Permalink
Test multiplatform native (#29)
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Wilson <[email protected]>
  • Loading branch information
swankjesse and squarejesse authored Oct 17, 2024
1 parent a85a938 commit 2cbee3e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions burst-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ tasks {
systemProperty("burstVersion", project.version)
dependsOn(":burst-gradle-plugin:publishAllPublicationsToTestMavenRepository")
dependsOn(":burst-kotlin-plugin:publishAllPublicationsToTestMavenRepository")

// Depend on the host platforms exercised by BurstGradlePluginTest.
dependsOn(":burst:publishJsPublicationToTestMavenRepository")
dependsOn(":burst:publishJvmPublicationToTestMavenRepository")
dependsOn(":burst:publishKotlinMultiplatformPublicationToTestMavenRepository")
dependsOn(":burst:publishLinuxX64PublicationToTestMavenRepository")
dependsOn(":burst:publishMacosArm64PublicationToTestMavenRepository")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import assertk.assertions.isTrue
import java.io.File
import org.gradle.testkit.runner.GradleRunner
import org.gradle.testkit.runner.TaskOutcome
import org.jetbrains.kotlin.konan.target.HostManager
import org.jetbrains.kotlin.konan.target.presetName
import org.junit.Test

class BurstGradlePluginTest {
Expand All @@ -45,6 +47,16 @@ class BurstGradlePluginTest {
)
}

@Test
fun multiplatformNative() {
// Like 'linuxX64' or 'macosArm64'.
val platformName = HostManager.host.presetName
multiplatform(
testTaskName = "${platformName}Test",
platformName = platformName,
)
}

private fun multiplatform(
testTaskName: String,
platformName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ kotlin {
nodejs()
}

// Cover the host platforms where we run Burst tests.
linuxX64()
macosArm64()

sourceSets {
commonTest {
dependencies {
Expand Down

0 comments on commit 2cbee3e

Please sign in to comment.