[Gradle, K/N] Add proper assumptions for Mac only integration tests
This commit is contained in:
+8
-3
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.gradle.util.modify
|
|||||||
import org.jetbrains.kotlin.konan.target.HostManager
|
import org.jetbrains.kotlin.konan.target.HostManager
|
||||||
import org.junit.Assume.assumeTrue
|
import org.junit.Assume.assumeTrue
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
|
import org.junit.BeforeClass
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
@@ -867,7 +868,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
|||||||
vararg args: String
|
vararg args: String
|
||||||
) {
|
) {
|
||||||
// check that test executable
|
// check that test executable
|
||||||
assumeTrue(HostManager.hostIsMac)
|
|
||||||
build(taskName, *args) {
|
build(taskName, *args) {
|
||||||
//base checks
|
//base checks
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -1082,7 +1082,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
|||||||
subprojectsToFrameworkNamesMap: Map<String, String?>,
|
subprojectsToFrameworkNamesMap: Map<String, String?>,
|
||||||
subprojectsToPodspecContentMap: Map<String, String?>
|
subprojectsToPodspecContentMap: Map<String, String?>
|
||||||
) {
|
) {
|
||||||
assumeTrue(HostManager.hostIsMac)
|
|
||||||
val gradleProject = transformProjectWithPluginsDsl(projectName, gradleVersion)
|
val gradleProject = transformProjectWithPluginsDsl(projectName, gradleVersion)
|
||||||
|
|
||||||
for ((subproject, frameworkName) in subprojectsToFrameworkNamesMap) {
|
for ((subproject, frameworkName) in subprojectsToFrameworkNamesMap) {
|
||||||
@@ -1154,7 +1153,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
|||||||
iosAppLocation: String?,
|
iosAppLocation: String?,
|
||||||
subprojectsToFrameworkNamesMap: Map<String, String?>
|
subprojectsToFrameworkNamesMap: Map<String, String?>
|
||||||
) {
|
) {
|
||||||
assumeTrue(HostManager.hostIsMac)
|
|
||||||
val gradleProject = transformProjectWithPluginsDsl(projectName, gradleVersion)
|
val gradleProject = transformProjectWithPluginsDsl(projectName, gradleVersion)
|
||||||
|
|
||||||
with(gradleProject) {
|
with(gradleProject) {
|
||||||
@@ -1304,4 +1302,11 @@ class CocoaPodsIT : BaseGradleIT() {
|
|||||||
end
|
end
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@BeforeClass
|
||||||
|
@JvmStatic
|
||||||
|
fun assumeItsMac() {
|
||||||
|
assumeTrue(HostManager.hostIsMac)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+9
-3
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.gradle.GradleVersionRequired
|
|||||||
import org.jetbrains.kotlin.gradle.transformProjectWithPluginsDsl
|
import org.jetbrains.kotlin.gradle.transformProjectWithPluginsDsl
|
||||||
import org.jetbrains.kotlin.konan.target.HostManager
|
import org.jetbrains.kotlin.konan.target.HostManager
|
||||||
import org.junit.Assume
|
import org.junit.Assume
|
||||||
|
import org.junit.BeforeClass
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
class CommonNativeIT : BaseGradleIT() {
|
class CommonNativeIT : BaseGradleIT() {
|
||||||
@@ -54,7 +55,6 @@ class CommonNativeIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testCommonIos() {
|
fun testCommonIos() {
|
||||||
Assume.assumeTrue(HostManager.hostIsMac)
|
|
||||||
doCommonNativeTest(
|
doCommonNativeTest(
|
||||||
"common-ios",
|
"common-ios",
|
||||||
libTargets = listOf("iosLibArm64", "iosLibX64"),
|
libTargets = listOf("iosLibArm64", "iosLibX64"),
|
||||||
@@ -64,7 +64,6 @@ class CommonNativeIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testCommonWatchos() {
|
fun testCommonWatchos() {
|
||||||
Assume.assumeTrue(HostManager.hostIsMac)
|
|
||||||
doCommonNativeTest(
|
doCommonNativeTest(
|
||||||
"common-watchos",
|
"common-watchos",
|
||||||
libTargets = listOf("watchosLibArm32", "watchosLibArm64", "watchosLibX86"),
|
libTargets = listOf("watchosLibArm32", "watchosLibArm64", "watchosLibX86"),
|
||||||
@@ -74,12 +73,19 @@ class CommonNativeIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testCommonTvos() {
|
fun testCommonTvos() {
|
||||||
Assume.assumeTrue(HostManager.hostIsMac)
|
|
||||||
doCommonNativeTest(
|
doCommonNativeTest(
|
||||||
"common-tvos",
|
"common-tvos",
|
||||||
libTargets = listOf("tvosLibArm64", "tvosLibX64"),
|
libTargets = listOf("tvosLibArm64", "tvosLibX64"),
|
||||||
appTargets = listOf("tvosArm64", "tvosX64")
|
appTargets = listOf("tvosArm64", "tvosX64")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@BeforeClass
|
||||||
|
@JvmStatic
|
||||||
|
fun assumeItsMac() {
|
||||||
|
Assume.assumeTrue(HostManager.hostIsMac)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-4
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.gradle.util.modify
|
|||||||
import org.jetbrains.kotlin.gradle.util.runProcess
|
import org.jetbrains.kotlin.gradle.util.runProcess
|
||||||
import org.jetbrains.kotlin.konan.target.HostManager
|
import org.jetbrains.kotlin.konan.target.HostManager
|
||||||
import org.junit.Assume
|
import org.junit.Assume
|
||||||
|
import org.junit.BeforeClass
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import kotlin.test.assertTrue
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
@@ -23,7 +24,6 @@ class FatFrameworkIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun smokeIos() {
|
fun smokeIos() {
|
||||||
Assume.assumeTrue(HostManager.hostIsMac)
|
|
||||||
transformProjectWithPluginsDsl(
|
transformProjectWithPluginsDsl(
|
||||||
"smoke",
|
"smoke",
|
||||||
directoryPrefix = "native-fat-framework"
|
directoryPrefix = "native-fat-framework"
|
||||||
@@ -46,7 +46,6 @@ class FatFrameworkIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun smokeWatchos() {
|
fun smokeWatchos() {
|
||||||
Assume.assumeTrue(HostManager.hostIsMac)
|
|
||||||
with(transformProjectWithPluginsDsl("smoke", directoryPrefix = "native-fat-framework")) {
|
with(transformProjectWithPluginsDsl("smoke", directoryPrefix = "native-fat-framework")) {
|
||||||
|
|
||||||
gradleBuildScript().modify {
|
gradleBuildScript().modify {
|
||||||
@@ -113,7 +112,6 @@ class FatFrameworkIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testDuplicatedArchitecture() {
|
fun testDuplicatedArchitecture() {
|
||||||
Assume.assumeTrue(HostManager.hostIsMac)
|
|
||||||
with(transformProjectWithPluginsDsl("smoke", directoryPrefix = "native-fat-framework")) {
|
with(transformProjectWithPluginsDsl("smoke", directoryPrefix = "native-fat-framework")) {
|
||||||
gradleBuildScript().modify {
|
gradleBuildScript().modify {
|
||||||
it + """
|
it + """
|
||||||
@@ -132,7 +130,6 @@ class FatFrameworkIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testIncorrectFamily() {
|
fun testIncorrectFamily() {
|
||||||
Assume.assumeTrue(HostManager.hostIsMac)
|
|
||||||
with(transformProjectWithPluginsDsl("smoke", directoryPrefix = "native-fat-framework")) {
|
with(transformProjectWithPluginsDsl("smoke", directoryPrefix = "native-fat-framework")) {
|
||||||
gradleBuildScript().modify {
|
gradleBuildScript().modify {
|
||||||
it + """
|
it + """
|
||||||
@@ -148,5 +145,13 @@ class FatFrameworkIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@BeforeClass
|
||||||
|
@JvmStatic
|
||||||
|
fun assumeItsMac() {
|
||||||
|
Assume.assumeTrue(HostManager.hostIsMac)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user