[Gradle, K/N] Add test for KT-52303
This commit is contained in:
committed by
Space
parent
d7c1f6765e
commit
3a1d83e7c5
+6
@@ -553,6 +553,12 @@ abstract class BaseGradleIT {
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun CompiledProject.assertDirectoryExists(path: String): CompiledProject {
|
||||||
|
assertFileExists(path)
|
||||||
|
assertTrue(fileInWorkingDir(path).isDirectory, "$path is not a directory")
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
fun CompiledProject.assertFileIsSymlink(path: String = ""): CompiledProject {
|
fun CompiledProject.assertFileIsSymlink(path: String = ""): CompiledProject {
|
||||||
assertTrue(Files.isSymbolicLink(fileInWorkingDir(path).toPath()), "The file [$path] isn't a symlink.")
|
assertTrue(Files.isSymbolicLink(fileInWorkingDir(path).toPath()), "The file [$path] isn't a symlink.")
|
||||||
return this
|
return this
|
||||||
|
|||||||
+15
@@ -1147,6 +1147,21 @@ class GeneralNativeIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// KT-52303
|
||||||
|
@Test
|
||||||
|
fun testBuildDirChangeAppliedToBinaries() = with(transformNativeTestProjectWithPluginDsl("executables", directoryPrefix = "native-binaries")) {
|
||||||
|
gradleBuildScript().appendText(
|
||||||
|
"""
|
||||||
|
project.buildDir = file("${'$'}{project.buildDir.absolutePath}/mydir")
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
build(":linkDebugExecutableHost") {
|
||||||
|
assertSuccessful()
|
||||||
|
assertDirectoryExists("build/mydir/bin/host/debugExecutable")
|
||||||
|
assertNoSuchFile("build/bin")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun List<String>.containsSequentially(vararg elements: String): Boolean {
|
fun List<String>.containsSequentially(vararg elements: String): Boolean {
|
||||||
check(elements.isNotEmpty())
|
check(elements.isNotEmpty())
|
||||||
|
|||||||
Reference in New Issue
Block a user