Skip to content

Migrate DependencyResolutionTests to Swift Testing #8985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions Sources/_IntegrationTestSupport/Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ public let xcodebuild: AbsolutePath = {
package func sh(
_ arguments: CustomStringConvertible...,
env: [String: String] = [:],
file: StaticString = #file,
line: UInt = #line
sourceLocation: SourceLocation = #_sourceLocation,
) throws -> ShReturnType {
let result = try _sh(arguments, env: env, file: file, line: line)
let result = try _sh(arguments, env: env)
let stdout = try result.utf8Output()
let stderr = try result.utf8stderrOutput()

Expand All @@ -84,7 +83,8 @@ package func sh(
.record(
Comment(
"Command failed with exit code: \(result.exitStatus) - \(result.integrationTests_debugDescription)"
)
),
sourceLocation: sourceLocation,
)
}

Expand All @@ -95,8 +95,6 @@ package func sh(
package func _sh(
_ arguments: [CustomStringConvertible],
env: [String: String] = [:],
file: StaticString = #file,
line: UInt = #line
) throws -> AsyncProcessResult {
var environment = Environment()

Expand Down
5 changes: 5 additions & 0 deletions Sources/_InternalTestSupport/SwiftTesting+Tags.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ extension Tag.Feature {
public enum PackageType {}

@Tag public static var CodeCoverage: Tag
@Tag public static var Mirror: Tag
@Tag public static var Resource: Tag
@Tag public static var SpecialCharacters: Tag
@Tag public static var Traits: Tag

}

extension Tag.Feature.Command {
Expand All @@ -40,12 +42,15 @@ extension Tag.Feature.Command {
}

extension Tag.Feature.Command.Package {
@Tag public static var Config: Tag
@Tag public static var Init: Tag
@Tag public static var DumpPackage: Tag
@Tag public static var DumpSymbolGraph: Tag
@Tag public static var Plugin: Tag
@Tag public static var Reset: Tag
@Tag public static var ShowDependencies: Tag
@Tag public static var ToolsVersion: Tag
@Tag public static var Update: Tag
}

extension Tag.Feature.PackageType {
Expand Down
14 changes: 14 additions & 0 deletions Sources/_InternalTestSupport/SwiftTesting+TraitsBug.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ extension Trait where Self == Testing.Bug {
bug(nil, id: 0, "\(relationship): \(issue)")
}
}

extension Trait where Self == Testing.Bug {
public static var IssueWindowsLongPath: Self {
.issue("https://github.com/swiftlang/swift-tools-support-core/pull/521", relationship: .fixedBy)
}

public static var IssueProductTypeForObjectLibraries: Self {
.issue("https://github.com/swiftlang/swift-build/issues/609", relationship: .defect)
}

public static var IssueSwiftBuildLinuxRunnable: Self {
.issue("https://github.com/swiftlang/swift-package-manager/issues/8416", relationship: .defect)
}
}
Loading