Skip to content

Commit e837e11

Browse files
authored
Add more swiftbuild tests for functions that require swift run (#8375)
Now that `swift run` is working with the swiftbuild build system enable more tests that require that functionality.
1 parent db6e0de commit e837e11

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

Tests/CommandsTests/BuildCommandTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ class BuildCommandSwiftBuildTests: BuildCommandTestCases {
866866
}
867867

868868
override func testGetTaskAllowEntitlement() async throws {
869-
throw XCTSkip("SWBINTTODO: Test failed because swiftbuild doesn't output precis codesign commands. Once swift run works with swiftbuild the test can be investigated.")
869+
throw XCTSkip("SWBINTTODO: Test failed because swiftbuild doesn't output the codesign commands that the test expects.")
870870
}
871871

872872
override func testCodeCoverage() async throws {

Tests/CommandsTests/RunCommandTests.swift

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ class RunCommandTestCase: CommandsBuildProviderTestCase {
7272
XCTAssertMatch(stdout, .contains("sentinel"))
7373

7474
// swift-build-tool output should go to stderr.
75-
XCTAssertMatch(stderr, .regex("Compiling"))
76-
XCTAssertMatch(stderr, .contains("Linking"))
75+
XCTAssertMatch(stderr, .contains("Building for debugging"))
76+
if self.buildSystemProvider == .native {
77+
XCTAssertMatch(stderr, .contains("Linking"))
78+
}
7779
}
7880
}
7981
#endif
@@ -89,8 +91,10 @@ class RunCommandTestCase: CommandsBuildProviderTestCase {
8991
"""))
9092

9193
// swift-build-tool output should go to stderr.
92-
XCTAssertMatch(stderr, .regex("Compiling"))
93-
XCTAssertMatch(stderr, .contains("Linking"))
94+
XCTAssertMatch(stderr, .contains("Building for debugging"))
95+
if self.buildSystemProvider == .native {
96+
XCTAssertMatch(stderr, .contains("Linking"))
97+
}
9498

9599
await XCTAssertThrowsCommandExecutionError(try await execute(["unknown"], packagePath: fixturePath)) { error in
96100
XCTAssertMatch(error.stderr, .contains("error: no executable product named 'unknown'"))
@@ -253,20 +257,4 @@ class RunCommandSwiftBuildTests: RunCommandTestCase {
253257
override func testUsage() async throws {
254258
try await super.testUsage()
255259
}
256-
257-
override func testMultipleExecutableAndExplicitExecutable() async throws {
258-
throw XCTSkip("SWBINTTODO: https://github.com/swiftlang/swift-package-manager/issues/8279: Swift run using Swift Build does not output executable content to the terminal")
259-
}
260-
261-
override func testUnknownProductAndArgumentPassing() async throws {
262-
throw XCTSkip("SWBINTTODO: https://github.com/swiftlang/swift-package-manager/issues/8279: Swift run using Swift Build does not output executable content to the terminal")
263-
}
264-
265-
override func testToolsetDebugger() async throws {
266-
throw XCTSkip("SWBINTTODO: Test fixture fails to build")
267-
}
268-
269-
override func testUnreachableExecutable() async throws {
270-
throw XCTSkip("SWBINTTODO: Test fails because of build layout differences.")
271-
}
272260
}

0 commit comments

Comments
 (0)