Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test multiplatform native #29

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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