From c08d42d6bb4a1a63d4c91170abac37cd95426aab Mon Sep 17 00:00:00 2001 From: "konstantin.tskhovrebov" Date: Wed, 9 Feb 2022 15:28:08 +0100 Subject: [PATCH] KT-50106 Add gradle property with global K/N linker flags Clean NativePlatformLibsIT code --- .../kotlin/gradle/native/NativePlatformLibsIT.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/NativePlatformLibsIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/NativePlatformLibsIT.kt index a0e99707fac..86237bab2ab 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/NativePlatformLibsIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/native/NativePlatformLibsIT.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.gradle.* import org.jetbrains.kotlin.gradle.embedProject 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.withNativeCommandLineArguments import org.jetbrains.kotlin.gradle.transformProjectWithPluginsDsl import org.jetbrains.kotlin.gradle.util.modify import org.jetbrains.kotlin.gradle.utils.NativeCompilerDownloader @@ -180,12 +181,11 @@ class NativePlatformLibsIT : BaseGradleIT() { ":compileKotlinLinuxX64", ":linkDebugSharedLinuxX64" ) - assertContains("-Xfoo=bar") - assertContains("-Xbaz=qux") - assertContains("-Xmen=pool") - assertContains("w: Flag is not supported by this version of the compiler: -Xfoo=bar") - 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") + withNativeCommandLineArguments(":linkDebugSharedLinuxX64") { + assertTrue(it.contains("-Xfoo=bar")) + assertTrue(it.contains("-Xbaz=qux")) + assertTrue(it.contains("-Xmen=pool")) + } assertFileExists("/build/bin/linuxX64/debugShared/libnative_platform_libraries.so") assertFileExists("/build/bin/linuxX64/debugShared/libnative_platform_libraries_api.h") }