Skip to content

Commit 6618e51

Browse files
committed
Migrate DependencyResolutionTests to Swift Testing
Migrate the Dependency Resolution tests to Swift Testing and augment them to buid against the SwiftBuild build system
1 parent 20c5bd3 commit 6618e51

File tree

6 files changed

+367
-152
lines changed

6 files changed

+367
-152
lines changed

Sources/_IntegrationTestSupport/Helpers.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@ public let xcodebuild: AbsolutePath = {
7272
package func sh(
7373
_ arguments: CustomStringConvertible...,
7474
env: [String: String] = [:],
75-
file: StaticString = #file,
76-
line: UInt = #line
75+
sourceLocation: SourceLocation = #_sourceLocation,
7776
) throws -> ShReturnType {
78-
let result = try _sh(arguments, env: env, file: file, line: line)
77+
let result = try _sh(arguments, env: env)
7978
let stdout = try result.utf8Output()
8079
let stderr = try result.utf8stderrOutput()
8180

@@ -84,7 +83,8 @@ package func sh(
8483
.record(
8584
Comment(
8685
"Command failed with exit code: \(result.exitStatus) - \(result.integrationTests_debugDescription)"
87-
)
86+
),
87+
sourceLocation: sourceLocation,
8888
)
8989
}
9090

@@ -95,8 +95,6 @@ package func sh(
9595
package func _sh(
9696
_ arguments: [CustomStringConvertible],
9797
env: [String: String] = [:],
98-
file: StaticString = #file,
99-
line: UInt = #line
10098
) throws -> AsyncProcessResult {
10199
var environment = Environment()
102100

Sources/_InternalTestSupport/SwiftTesting+Tags.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ extension Tag.Feature {
2727
public enum PackageType {}
2828

2929
@Tag public static var CodeCoverage: Tag
30+
@Tag public static var Mirror: Tag
3031
@Tag public static var Resource: Tag
3132
@Tag public static var SpecialCharacters: Tag
3233
@Tag public static var Traits: Tag
34+
3335
}
3436

3537
extension Tag.Feature.Command {
@@ -40,10 +42,13 @@ extension Tag.Feature.Command {
4042
}
4143

4244
extension Tag.Feature.Command.Package {
45+
@Tag public static var Config: Tag
4346
@Tag public static var Init: Tag
4447
@Tag public static var DumpPackage: Tag
4548
@Tag public static var DumpSymbolGraph: Tag
4649
@Tag public static var Plugin: Tag
50+
@Tag public static var ShowDependencies: Tag
51+
@Tag public static var Update: Tag
4752
}
4853

4954
extension Tag.Feature.PackageType {

Sources/_InternalTestSupport/SwiftTesting+TraitsBug.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,17 @@ extension Trait where Self == Testing.Bug {
3030
bug(nil, id: 0, "\(relationship): \(issue)")
3131
}
3232
}
33+
34+
extension Trait where Self == Testing.Bug {
35+
public static var IssueWindowsLongPath: Self {
36+
.issue("https://github.com/swiftlang/swift-tools-support-core/pull/521", relationship: .fixedBy)
37+
}
38+
39+
public static var IssueProductTypeForObjectLibraries: Self {
40+
.issue("https://github.com/swiftlang/swift-build/issues/609", relationship: .defect)
41+
}
42+
43+
public static var IssueSwiftBuildLinuxRunnable: Self {
44+
.issue("https://github.com/swiftlang/swift-package-manager/issues/8416", relationship: .defect)
45+
}
46+
}

0 commit comments

Comments
 (0)