Configure framework tests to fail if framework header makes warnings

This commit is contained in:
Svyatoslav Scherbina
2019-06-21 14:22:33 +03:00
committed by SvyatoslavScherbina
parent 40ac5171f9
commit 36cf02a317
@@ -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)