From 36cf02a31717591b43b72923bec75afa12b025b4 Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Fri, 21 Jun 2019 14:22:33 +0300 Subject: [PATCH] Configure framework tests to fail if framework header makes warnings --- .../src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buildSrc/plugins/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt b/buildSrc/plugins/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt index e9b19800b16..78e18be7e7f 100644 --- a/buildSrc/plugins/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt +++ b/buildSrc/plugins/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt @@ -74,7 +74,12 @@ open class FrameworkTest : DefaultTask() { // Compile swift sources val sources = swiftSources.map { Paths.get(it).toString() } + listOf(provider.toString(), swiftMain) - val options = listOf("-g", "-Xlinker", "-rpath", "-Xlinker", frameworkParentDirPath, "-F", frameworkParentDirPath) + val options = listOf( + "-g", + "-Xlinker", "-rpath", "-Xlinker", frameworkParentDirPath, + "-F", frameworkParentDirPath, + "-Xcc", "-Werror" // To fail compilation on warnings in framework header. + ) val testExecutable = Paths.get(testOutput, frameworkName, "swiftTestExecutable") compileSwift(project, project.testTarget, sources, options, testExecutable, fullBitcode)