KT-50106 Add gradle property with global K/N linker flags

Clean NativePlatformLibsIT code
This commit is contained in:
konstantin.tskhovrebov
2022-02-09 15:28:08 +01:00
committed by teamcity
parent 4f981ff745
commit c08d42d6bb
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.gradle.*
import org.jetbrains.kotlin.gradle.embedProject import org.jetbrains.kotlin.gradle.embedProject
import org.jetbrains.kotlin.gradle.native.GeneralNativeIT.Companion.containsSequentially import org.jetbrains.kotlin.gradle.native.GeneralNativeIT.Companion.containsSequentially
import org.jetbrains.kotlin.gradle.native.GeneralNativeIT.Companion.extractNativeCommandLineArguments import org.jetbrains.kotlin.gradle.native.GeneralNativeIT.Companion.extractNativeCommandLineArguments
import org.jetbrains.kotlin.gradle.native.GeneralNativeIT.Companion.withNativeCommandLineArguments
import org.jetbrains.kotlin.gradle.transformProjectWithPluginsDsl import org.jetbrains.kotlin.gradle.transformProjectWithPluginsDsl
import org.jetbrains.kotlin.gradle.util.modify import org.jetbrains.kotlin.gradle.util.modify
import org.jetbrains.kotlin.gradle.utils.NativeCompilerDownloader import org.jetbrains.kotlin.gradle.utils.NativeCompilerDownloader
@@ -180,12 +181,11 @@ class NativePlatformLibsIT : BaseGradleIT() {
":compileKotlinLinuxX64", ":compileKotlinLinuxX64",
":linkDebugSharedLinuxX64" ":linkDebugSharedLinuxX64"
) )
assertContains("-Xfoo=bar") withNativeCommandLineArguments(":linkDebugSharedLinuxX64") {
assertContains("-Xbaz=qux") assertTrue(it.contains("-Xfoo=bar"))
assertContains("-Xmen=pool") assertTrue(it.contains("-Xbaz=qux"))
assertContains("w: Flag is not supported by this version of the compiler: -Xfoo=bar") assertTrue(it.contains("-Xmen=pool"))
assertContains("w: Flag is not supported by this version of the compiler: -Xbaz=qux") }
assertContains("w: Flag is not supported by this version of the compiler: -Xmen=pool")
assertFileExists("/build/bin/linuxX64/debugShared/libnative_platform_libraries.so") assertFileExists("/build/bin/linuxX64/debugShared/libnative_platform_libraries.so")
assertFileExists("/build/bin/linuxX64/debugShared/libnative_platform_libraries_api.h") assertFileExists("/build/bin/linuxX64/debugShared/libnative_platform_libraries_api.h")
} }