From 428a15397eb9e26609a11a25ebebd4f456d9017a Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Mon, 8 Nov 2021 14:47:58 +0700 Subject: [PATCH] [K/N] Suppress warnings of dsymutil in runtime tests --- .../org/jetbrains/kotlin/testing/native/NativeTest.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/testing/native/NativeTest.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/testing/native/NativeTest.kt index 8e1a7d93bc3..e298a1a0cb5 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/testing/native/NativeTest.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/testing/native/NativeTest.kt @@ -16,6 +16,7 @@ import org.jetbrains.kotlin.ExecClang import org.jetbrains.kotlin.bitcode.CompileToBitcode import org.jetbrains.kotlin.bitcode.CompileToBitcodeExtension import org.jetbrains.kotlin.konan.target.* +import java.io.OutputStream open class CompileNativeTest @Inject constructor( @InputFile val inputFile: File, @@ -174,6 +175,14 @@ open class LinkNativeTest @Inject constructor( for (command in commands) { project.exec { commandLine(command) + if (!logger.isInfoEnabled() && command[0].endsWith("dsymutil")) { + // Suppress dsymutl's warnings. + // See: https://bugs.swift.org/browse/SR-11539. + val nullOutputStream = object: OutputStream() { + override fun write(b: Int) {} + } + errorOutput = nullOutputStream + } } } }