[Gradle, K/N] Rename native native-specific test projects
Some native-specific tests was moved from NewMultiplatformIT but test projects used by them still have the "new-mpp" prefix. This patch replaces this prefix with "native".
This commit is contained in:
committed by
Alexander.Likhachev
parent
174e390d2c
commit
71fe60f4a2
+14
-14
@@ -96,7 +96,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
@Test
|
@Test
|
||||||
fun testEndorsedLibsController() {
|
fun testEndorsedLibsController() {
|
||||||
with(
|
with(
|
||||||
transformProjectWithPluginsDsl("new-mpp-native-endorsed")
|
transformProjectWithPluginsDsl("native-endorsed")
|
||||||
) {
|
) {
|
||||||
setupWorkingDir()
|
setupWorkingDir()
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testCanProduceNativeLibraries() = with(Project("new-mpp-native-libraries")) {
|
fun testCanProduceNativeLibraries() = with(Project("native-libraries")) {
|
||||||
val baseName = "main"
|
val baseName = "main"
|
||||||
|
|
||||||
val sharedPrefix = CompilerOutputKind.DYNAMIC.prefix(HostManager.host)
|
val sharedPrefix = CompilerOutputKind.DYNAMIC.prefix(HostManager.host)
|
||||||
@@ -209,7 +209,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
// Building K/N binaries is very time-consuming. So we check building only for Kotlin DSL.
|
// Building K/N binaries is very time-consuming. So we check building only for Kotlin DSL.
|
||||||
// For Groovy DSl we just check that a project can be configured.
|
// For Groovy DSl we just check that a project can be configured.
|
||||||
val project = transformProjectWithPluginsDsl(
|
val project = transformProjectWithPluginsDsl(
|
||||||
"groovy-dsl", directoryPrefix = "new-mpp-native-binaries"
|
"groovy-dsl", directoryPrefix = "native-binaries"
|
||||||
)
|
)
|
||||||
project.build("tasks") {
|
project.build("tasks") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -234,7 +234,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testNativeBinaryKotlinDSL() = with(
|
fun testNativeBinaryKotlinDSL() = with(
|
||||||
transformProjectWithPluginsDsl("kotlin-dsl", directoryPrefix = "new-mpp-native-binaries")
|
transformProjectWithPluginsDsl("kotlin-dsl", directoryPrefix = "native-binaries")
|
||||||
) {
|
) {
|
||||||
|
|
||||||
val hostSuffix = nativeHostTargetName.capitalize()
|
val hostSuffix = nativeHostTargetName.capitalize()
|
||||||
@@ -426,7 +426,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
// TODO: Reenable the test when the args are separated.
|
// TODO: Reenable the test when the args are separated.
|
||||||
@Ignore
|
@Ignore
|
||||||
@Test
|
@Test
|
||||||
fun testNativeFreeArgsWarning() = with(transformProjectWithPluginsDsl("kotlin-dsl", directoryPrefix = "new-mpp-native-binaries")) {
|
fun testNativeFreeArgsWarning() = with(transformProjectWithPluginsDsl("kotlin-dsl", directoryPrefix = "native-binaries")) {
|
||||||
gradleBuildScript().appendText(
|
gradleBuildScript().appendText(
|
||||||
"""kotlin.targets["macos64"].compilations["main"].kotlinOptions.freeCompilerArgs += "-opt""""
|
"""kotlin.targets["macos64"].compilations["main"].kotlinOptions.freeCompilerArgs += "-opt""""
|
||||||
)
|
)
|
||||||
@@ -472,7 +472,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testNativeTests() = with(Project("new-mpp-native-tests")) {
|
fun testNativeTests() = with(Project("native-tests")) {
|
||||||
val testTasks = listOf("macos64Test", "linux64Test", "mingw64Test", "iosTest")
|
val testTasks = listOf("macos64Test", "linux64Test", "mingw64Test", "iosTest")
|
||||||
val hostTestTask = "${nativeHostTargetName}Test"
|
val hostTestTask = "${nativeHostTargetName}Test"
|
||||||
|
|
||||||
@@ -566,12 +566,12 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
assertTrue(stacktrace.contains("""at org\.foo\.test#fail\(.*test\.kt:24\)""".toRegex()))
|
assertTrue(stacktrace.contains("""at org\.foo\.test#fail\(.*test\.kt:24\)""".toRegex()))
|
||||||
}
|
}
|
||||||
|
|
||||||
assertTestResults("testProject/new-mpp-native-tests/TEST-TestKt.xml", hostTestTask)
|
assertTestResults("testProject/native-tests/TEST-TestKt.xml", hostTestTask)
|
||||||
// K/N doesn't report line numbers correctly on Linux (see KT-35408).
|
// K/N doesn't report line numbers correctly on Linux (see KT-35408).
|
||||||
// TODO: Uncomment when this is fixed.
|
// TODO: Uncomment when this is fixed.
|
||||||
//assertStacktrace(hostTestTask)
|
//assertStacktrace(hostTestTask)
|
||||||
if (hostIsMac) {
|
if (hostIsMac) {
|
||||||
assertTestResults("testProject/new-mpp-native-tests/TEST-TestKt.xml", "iosTest")
|
assertTestResults("testProject/native-tests/TEST-TestKt.xml", "iosTest")
|
||||||
assertStacktrace("iosTest")
|
assertStacktrace("iosTest")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -583,7 +583,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testNativeTestGetters() = with(Project("new-mpp-native-tests")) {
|
fun testNativeTestGetters() = with(Project("native-tests")) {
|
||||||
// Check that test binaries can be accessed in a buildscript.
|
// Check that test binaries can be accessed in a buildscript.
|
||||||
build("checkNewGetters") {
|
build("checkNewGetters") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -631,7 +631,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
@Test
|
@Test
|
||||||
fun kt33750() {
|
fun kt33750() {
|
||||||
// Check that build fails if a test executable crashes.
|
// Check that build fails if a test executable crashes.
|
||||||
with(Project("new-mpp-native-tests")) {
|
with(Project("native-tests")) {
|
||||||
setupWorkingDir()
|
setupWorkingDir()
|
||||||
projectDir.resolve("src/commonTest/kotlin/test.kt").appendText("\nval fail: Int = error(\"\")\n")
|
projectDir.resolve("src/commonTest/kotlin/test.kt").appendText("\nval fail: Int = error(\"\")\n")
|
||||||
build("check") {
|
build("check") {
|
||||||
@@ -649,7 +649,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
val repo = libProject.projectDir.resolve("repo").absolutePath.replace('\\', '/')
|
val repo = libProject.projectDir.resolve("repo").absolutePath.replace('\\', '/')
|
||||||
|
|
||||||
with(Project("new-mpp-native-cinterop")) {
|
with(Project("native-cinterop")) {
|
||||||
|
|
||||||
setupWorkingDir()
|
setupWorkingDir()
|
||||||
listOf(gradleBuildScript(), gradleBuildScript("publishedLibrary")).forEach {
|
listOf(gradleBuildScript(), gradleBuildScript("publishedLibrary")).forEach {
|
||||||
@@ -725,7 +725,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
assertFalse(output.contains("Kotlin/Native distribution: "))
|
assertFalse(output.contains("Kotlin/Native distribution: "))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
with(Project("new-mpp-native-libraries")) {
|
with(Project("native-libraries")) {
|
||||||
build("tasks") {
|
build("tasks") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertTrue(output.contains("Kotlin/Native distribution: "))
|
assertTrue(output.contains("Kotlin/Native distribution: "))
|
||||||
@@ -770,7 +770,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
// Gradle 5.0 introduced a new API for Ivy repository layouts.
|
// Gradle 5.0 introduced a new API for Ivy repository layouts.
|
||||||
// MPP plugin uses this API to download K/N if Gradle version is >= 5.0.
|
// MPP plugin uses this API to download K/N if Gradle version is >= 5.0.
|
||||||
// Check this too (see KT-30258).
|
// Check this too (see KT-30258).
|
||||||
with(Project("new-mpp-native-libraries")) {
|
with(Project("native-libraries")) {
|
||||||
build("tasks", "-Pkotlin.native.version=1.3.50-eap-11606") {
|
build("tasks", "-Pkotlin.native.version=1.3.50-eap-11606") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertTrue(output.contains("Kotlin/Native distribution: "))
|
assertTrue(output.contains("Kotlin/Native distribution: "))
|
||||||
@@ -781,7 +781,7 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKt29725() {
|
fun testKt29725() {
|
||||||
with(Project("new-mpp-native-libraries")) {
|
with(Project("native-libraries")) {
|
||||||
// Assert that a project with a native target can be configured with Gradle 5.2
|
// Assert that a project with a native target can be configured with Gradle 5.2
|
||||||
build("tasks") {
|
build("tasks") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
|
|||||||
Reference in New Issue
Block a user