[IR] Fix tests for IR linking error reporting
- Run "ktor 1_5_4 and coroutines 1_5_0-RC-native-mt (KT-46697)" test only on Mac host - Fix application entry point function FQN - Use OS-neutral URI for configuration of local Maven repos instead of OS-specific path ^KT-44626
This commit is contained in:
+11
-3
@@ -10,6 +10,9 @@ import org.jetbrains.kotlin.gradle.GradleVersionRequired
|
|||||||
import org.jetbrains.kotlin.gradle.native.NativeExternalDependenciesIT.Companion.MASKED_TARGET_NAME
|
import org.jetbrains.kotlin.gradle.native.NativeExternalDependenciesIT.Companion.MASKED_TARGET_NAME
|
||||||
import org.jetbrains.kotlin.gradle.native.NativeExternalDependenciesIT.Companion.findKotlinNativeTargetName
|
import org.jetbrains.kotlin.gradle.native.NativeExternalDependenciesIT.Companion.findKotlinNativeTargetName
|
||||||
import org.jetbrains.kotlin.gradle.native.NativeExternalDependenciesIT.Companion.findParameterInOutput
|
import org.jetbrains.kotlin.gradle.native.NativeExternalDependenciesIT.Companion.findParameterInOutput
|
||||||
|
import org.jetbrains.kotlin.konan.target.HostManager
|
||||||
|
import org.junit.Assume
|
||||||
|
import org.junit.Assume.assumeTrue
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
@@ -90,7 +93,11 @@ class NativeIrLinkerIssuesIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `ktor 1_5_4 and coroutines 1_5_0-RC-native-mt (KT-46697)`() = buildApplicationAndFail(
|
fun `ktor 1_5_4 and coroutines 1_5_0-RC-native-mt (KT-46697)`() {
|
||||||
|
// Run this test only on macOS.
|
||||||
|
assumeTrue(HostManager.hostIsMac)
|
||||||
|
|
||||||
|
buildApplicationAndFail(
|
||||||
directory = null,
|
directory = null,
|
||||||
projectName = "native-ir-linker-issues-ktor-and-coroutines",
|
projectName = "native-ir-linker-issues-ktor-and-coroutines",
|
||||||
localRepo = null
|
localRepo = null
|
||||||
@@ -164,6 +171,7 @@ class NativeIrLinkerIssuesIT : BaseGradleIT() {
|
|||||||
|(*) - dependencies omitted (listed previously)
|
|(*) - dependencies omitted (listed previously)
|
||||||
""".trimMargin()
|
""".trimMargin()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun buildApplicationAndFail(
|
private fun buildApplicationAndFail(
|
||||||
directory: String?,
|
directory: String?,
|
||||||
@@ -207,9 +215,9 @@ class NativeIrLinkerIssuesIT : BaseGradleIT() {
|
|||||||
) {
|
) {
|
||||||
with(transformNativeTestProjectWithPluginDsl(directoryPrefix = directory, projectName = projectName)) {
|
with(transformNativeTestProjectWithPluginDsl(directoryPrefix = directory, projectName = projectName)) {
|
||||||
if (localRepo != null) {
|
if (localRepo != null) {
|
||||||
val localRepoPath = localRepo.absolutePath
|
val localRepoUri = localRepo.absoluteFile.toURI().toString()
|
||||||
gradleBuildScript().apply {
|
gradleBuildScript().apply {
|
||||||
writeText(readText().replace("<LocalRepo>", localRepoPath))
|
writeText(readText().replace("<LocalRepo>", localRepoUri))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ kotlin {
|
|||||||
<SingleNativeTarget>("native") {
|
<SingleNativeTarget>("native") {
|
||||||
binaries {
|
binaries {
|
||||||
executable {
|
executable {
|
||||||
entryPoint = "main"
|
entryPoint = "sample.app.main"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceSets["commonMain"].dependencies {
|
sourceSets["commonMain"].dependencies {
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ kotlin {
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = file("<LocalRepo>").toURI()
|
url = uri("<LocalRepo>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ kotlin {
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = file("<LocalRepo>").toURI()
|
url = uri("<LocalRepo>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ kotlin {
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = file("<LocalRepo>").toURI()
|
url = uri("<LocalRepo>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ kotlin {
|
|||||||
<SingleNativeTarget>("native") {
|
<SingleNativeTarget>("native") {
|
||||||
binaries {
|
binaries {
|
||||||
executable {
|
executable {
|
||||||
entryPoint = "main"
|
entryPoint = "sample.app.main"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceSets["commonMain"].dependencies {
|
sourceSets["commonMain"].dependencies {
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ kotlin {
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = file("<LocalRepo>").toURI()
|
url = uri("<LocalRepo>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ kotlin {
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = file("<LocalRepo>").toURI()
|
url = uri("<LocalRepo>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ kotlin {
|
|||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = file("<LocalRepo>").toURI()
|
url = uri("<LocalRepo>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user