Skip to content

Commit 7a539cc

Browse files
authored
Disable testImportOfMissedDepWarning (#6481)
The underlying functionality this tests appears to be broken when using certain versions of swift-driver, so we have to disable it for now. (cherry picked from commit fc17625)
1 parent ad4ffe4 commit 7a539cc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tests/CommandsTests/BuildToolTests.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,18 @@ final class BuildToolTests: CommandsTestCase {
7171
}
7272

7373
func testImportOfMissedDepWarning() throws {
74+
try XCTSkipIf(true, "tested functionality doesn't work due to 'libSwiftScan dependency scan query failed' (rdar://108512158)")
75+
7476
// Verify the warning flow
7577
try fixture(name: "Miscellaneous/ImportOfMissingDependency") { path in
7678
let fullPath = try resolveSymlinks(path)
7779
XCTAssertThrowsError(try build(["--explicit-target-dependency-import-check=warn"], packagePath: fullPath)) { error in
78-
guard case SwiftPMProductError.executionFailure(_, _, let stderr) = error else {
80+
guard case SwiftPMProductError.executionFailure(_, let stdout, let stderr) = error else {
7981
XCTFail()
8082
return
8183
}
8284

83-
XCTAssertTrue(stderr.contains("warning: Target A imports another target (B) in the package without declaring it a dependency."))
85+
XCTAssertTrue(stderr.contains("warning: Target A imports another target (B) in the package without declaring it a dependency."), "got stdout: \(stdout), stderr: \(stderr)")
8486
}
8587
}
8688

@@ -93,7 +95,7 @@ final class BuildToolTests: CommandsTestCase {
9395
return
9496
}
9597

96-
XCTAssertTrue(stderr.contains("error: Target A imports another target (B) in the package without declaring it a dependency."))
98+
XCTAssertTrue(stderr.contains("error: Target A imports another target (B) in the package without declaring it a dependency."), "got stdout: \(stdout), stderr: \(stderr)")
9799
}
98100
}
99101

@@ -105,7 +107,7 @@ final class BuildToolTests: CommandsTestCase {
105107
XCTFail()
106108
return
107109
}
108-
XCTAssertFalse(stderr.contains("warning: Target A imports another target (B) in the package without declaring it a dependency."))
110+
XCTAssertFalse(stderr.contains("warning: Target A imports another target (B) in the package without declaring it a dependency."), "got stdout: \(stdout), stderr: \(stderr)")
109111
}
110112
}
111113
}

0 commit comments

Comments
 (0)