Skip to content

Commit 2ec37b7

Browse files
authored
Tests: Augment TraitTests to support SwiftBuild (#8813)
In the process of updating the TraitTests to add test support for the Swift Build build system, migrate the test Suite to Swift Testing, making use of parameterized tests to reduce duplication and use `withKnownIssue` to get signal when tests have been fixed. Depends on: #8714
1 parent 1ec5919 commit 2ec37b7

File tree

5 files changed

+301
-156
lines changed

5 files changed

+301
-156
lines changed

Sources/_InternalTestSupport/SkippedTestSupport.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ extension Tag.Feature {
8484
@Tag public static var CodeCoverage: Tag
8585
@Tag public static var Resource: Tag
8686
@Tag public static var SpecialCharacters: Tag
87+
@Tag public static var Traits: Tag
8788
}
8889

8990

@@ -96,6 +97,9 @@ extension Tag.Feature.Command {
9697

9798
extension Tag.Feature.Command.Package {
9899
@Tag public static var Init: Tag
100+
@Tag public static var DumpPackage: Tag
101+
@Tag public static var DumpSymbolGraph: Tag
102+
@Tag public static var Plugin: Tag
99103
}
100104
extension Tag.Feature.PackageType {
101105
@Tag public static var Library: Tag

Sources/_InternalTestSupport/misc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public func executeSwiftRun(
321321
Xld: [String] = [],
322322
Xswiftc: [String] = [],
323323
env: Environment? = nil,
324-
buildSystem: BuildSystemProvider.Kind = .native
324+
buildSystem: BuildSystemProvider.Kind
325325
) async throws -> (stdout: String, stderr: String) {
326326
var args = swiftArgs(
327327
configuration: configuration,

Tests/FunctionalTests/ResourcesTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ final class ResourcesTests: XCTestCase {
3434
#endif
3535

3636
for execName in executables {
37-
let (output, _) = try await executeSwiftRun(fixturePath, execName)
37+
let (output, _) = try await executeSwiftRun(fixturePath, execName, buildSystem: .native)
3838
XCTAssertTrue(output.contains("foo"), output)
3939
}
4040
}

Tests/FunctionalTests/StaticBinaryLibrary.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ struct StaticBinaryLibraryTests {
2727
let (stdout, stderr) = try await executeSwiftRun(
2828
fixturePath.appending("Static").appending("Package1"),
2929
"Example",
30-
extraArgs: ["--experimental-prune-unused-dependencies"]
30+
extraArgs: ["--experimental-prune-unused-dependencies"],
31+
buildSystem: .native,
3132
)
3233
#expect(stdout == """
3334
42

0 commit comments

Comments
 (0)