diff --git a/Tests/CommandsTests/BuildCommandTests.swift b/Tests/CommandsTests/BuildCommandTests.swift index ec94f9cb9a5..589a3289d87 100644 --- a/Tests/CommandsTests/BuildCommandTests.swift +++ b/Tests/CommandsTests/BuildCommandTests.swift @@ -142,7 +142,7 @@ final class BuildCommandTests: CommandsTestCase { stderr.contains( "error: Target A imports another target (B) in the package without declaring it a dependency." ), - "got stdout: \(stdout), stderr: \(stderr)" + "got stdout: \(String(describing: stdout)), stderr: \(String(describing: stderr))" ) } } @@ -159,7 +159,7 @@ final class BuildCommandTests: CommandsTestCase { stderr.contains( "warning: Target A imports another target (B) in the package without declaring it a dependency." ), - "got stdout: \(stdout), stderr: \(stderr)" + "got stdout: \(String(describing: stdout)), stderr: \(String(describing: stderr))" ) } } diff --git a/Tests/CommandsTests/PackageCommandTests.swift b/Tests/CommandsTests/PackageCommandTests.swift index 15064647b12..c644958b077 100644 --- a/Tests/CommandsTests/PackageCommandTests.swift +++ b/Tests/CommandsTests/PackageCommandTests.swift @@ -2522,27 +2522,27 @@ final class PackageCommandTests: CommandsTestCase { // Overall configuration: debug, plugin build request: debug -> without testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "debug", "check-testability", "InternalModule", "debug", "true"], packagePath: fixturePath)) + await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "debug", "check-testability", "InternalModule", "debug", "true"], packagePath: fixturePath)) } // Overall configuration: debug, plugin build request: release -> without testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "debug", "check-testability", "InternalModule", "release", "false"], packagePath: fixturePath)) + await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "debug", "check-testability", "InternalModule", "release", "false"], packagePath: fixturePath)) } // Overall configuration: release, plugin build request: debug -> with testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "InternalModule", "debug", "true"], packagePath: fixturePath)) + await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "InternalModule", "debug", "true"], packagePath: fixturePath)) } // Overall configuration: release, plugin build request: release -> with testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "InternalModule", "release", "false"], packagePath: fixturePath)) + await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "InternalModule", "release", "false"], packagePath: fixturePath)) } // Overall configuration: release, plugin build request: release including tests -> with testability try await fixture(name: "Miscellaneous/Plugins/CommandPluginTestStub") { fixturePath in - try await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "all-with-tests", "release", "true"], packagePath: fixturePath)) + await XCTAssertAsyncNoThrow(try await SwiftPM.Package.execute(["-c", "release", "check-testability", "all-with-tests", "release", "true"], packagePath: fixturePath)) } } diff --git a/Tests/FunctionalTests/TraitTests.swift b/Tests/FunctionalTests/TraitTests.swift index e1164eea6e1..722782216d1 100644 --- a/Tests/FunctionalTests/TraitTests.swift +++ b/Tests/FunctionalTests/TraitTests.swift @@ -19,7 +19,7 @@ import XCTest final class TraitTests: XCTestCase { func testTraits_whenNoFlagPassed() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example") + let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example") // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -38,7 +38,7 @@ final class TraitTests: XCTestCase { func testTraits_whenTraitUnification() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package9,Package10"]) + let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package9,Package10"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -61,7 +61,7 @@ final class TraitTests: XCTestCase { func testTraits_whenTraitUnification_whenSecondTraitNotEnabled() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package9"]) + let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package9"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -82,7 +82,7 @@ final class TraitTests: XCTestCase { func testTraits_whenIndividualTraitsEnabled_andDefaultTraits() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package5,Package7,BuildCondition3"]) + let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "default,Package5,Package7,BuildCondition3"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -119,7 +119,7 @@ final class TraitTests: XCTestCase { func testTraits_whenIndividualTraitsEnabled_andDefaultTraitsDisabled() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "Package5,Package7"]) + let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--traits", "Package5,Package7"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // When fixed, GitHub issue #8131 should re-enable the below assert. // XCTAssertFalse(stderr.contains("warning:")) @@ -137,7 +137,7 @@ final class TraitTests: XCTestCase { func testTraits_whenAllTraitsEnabled() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--enable-all-traits"]) + let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--enable-all-traits"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // GitHub issue #8131 // XCTAssertFalse(stderr.contains("warning:")) @@ -163,7 +163,7 @@ final class TraitTests: XCTestCase { func testTraits_whenAllTraitsEnabled_andDefaultTraitsDisabled() async throws { try await fixture(name: "Traits") { fixturePath in - let (stdout, stderr) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--enable-all-traits", "--disable-default-traits"]) + let (stdout, _) = try await executeSwiftRun(fixturePath.appending("Example"), "Example", extraArgs: ["--enable-all-traits", "--disable-default-traits"]) // We expect no warnings to be produced. Specifically no unused dependency warnings. // GitHub issue #8131 // XCTAssertFalse(stderr.contains("warning:")) diff --git a/Tests/WorkspaceTests/WorkspaceTests.swift b/Tests/WorkspaceTests/WorkspaceTests.swift index d4296f32302..568f184142d 100644 --- a/Tests/WorkspaceTests/WorkspaceTests.swift +++ b/Tests/WorkspaceTests/WorkspaceTests.swift @@ -8684,7 +8684,6 @@ final class WorkspaceTests: XCTestCase { let maxConcurrentRequests = 2 let concurrentRequests = ThreadSafeBox(0) - let concurrentRequestsLock = NSLock() var configuration = HTTPClient.Configuration() configuration.maxConcurrentRequests = maxConcurrentRequests