diff --git a/Sources/SourceControl/Repository.swift b/Sources/SourceControl/Repository.swift index 71a438681c1..043ef427abd 100644 --- a/Sources/SourceControl/Repository.swift +++ b/Sources/SourceControl/Repository.swift @@ -47,7 +47,7 @@ public struct RepositorySpecifier: Hashable, Sendable { if basename.hasSuffix(".git") { basename = String(basename.dropLast(4)) } - if basename == "/" { + if basename == "/" || basename == "\\" { return "" } return basename diff --git a/Tests/BasicsTests/AsyncProcessTests.swift b/Tests/BasicsTests/AsyncProcessTests.swift index 656831ef3c2..11ab50adda4 100644 --- a/Tests/BasicsTests/AsyncProcessTests.swift +++ b/Tests/BasicsTests/AsyncProcessTests.swift @@ -53,16 +53,14 @@ final class AsyncProcessTests: XCTestCase { } func testPopenWithBufferLargerThanAllocated() throws { - try XCTSkipOnWindows(because: "https://github.com/swiftlang/swift-package-manager/issues/9031: test fails on windows.") - // Test buffer larger than that allocated. try withTemporaryFile { file in let count = 10000 let stream = BufferedOutputByteStream() stream.send(Format.asRepeating(string: "a", count: count)) - try localFileSystem.writeFileContents(file.path, bytes: stream.bytes) + file.fileHandle.write(Data(stream.bytes.contents)) let actualStreamCount = stream.bytes.count - XCTAssertTrue(actualStreamCount == count, "Actual stream count (\(actualStreamCount)) is not as exxpected (\(count))") + XCTAssertTrue(actualStreamCount == count, "Actual stream count (\(actualStreamCount)) is not as expected (\(count))") let outputCount = try AsyncProcess.popen(arguments: catExecutableArgs + [file.path.pathString]).utf8Output().count XCTAssert(outputCount == count, "Actual count (\(outputCount)) is not as expected (\(count))") } diff --git a/Tests/BasicsTests/FileSystem/InMemoryFilesSystemTests.swift b/Tests/BasicsTests/FileSystem/InMemoryFilesSystemTests.swift index b2f50811f42..2a766015332 100644 --- a/Tests/BasicsTests/FileSystem/InMemoryFilesSystemTests.swift +++ b/Tests/BasicsTests/FileSystem/InMemoryFilesSystemTests.swift @@ -145,7 +145,7 @@ struct InMemoryFileSystemTests { // WHEN we write contents to the file // THEn we expect an error to occus - withKnownIssue { + #expect(throws: (any Error).self) { try fs.writeFileContents(pathUnderTest, bytes: expectedContents) } @@ -165,7 +165,7 @@ struct InMemoryFileSystemTests { // WHEN we write contents to the file // THEN we expect an error to occur - withKnownIssue { + #expect(throws: (any Error).self) { try fs.writeFileContents(pathUnderTest, bytes: expectedContents) } @@ -185,7 +185,7 @@ struct InMemoryFileSystemTests { // WHEN we write contents to the file // THEN we expect an error to occur - withKnownIssue { + #expect(throws: (any Error).self) { try fs.writeFileContents(pathUnderTest, bytes: expectedContents) } @@ -201,7 +201,7 @@ struct InMemoryFileSystemTests { // WHEN we read a non-existing file // THEN an error occurs - withKnownIssue { + #expect(throws: (any Error).self) { let _ = try fs.readFileContents("/file/does/not/exists") } } @@ -317,8 +317,8 @@ struct InMemoryFileSystemTests { // WHEN we read the contents of a directory // THEN we expect a failure to occur - withKnownIssue { - let _ = try fs.readFileContents(pathUnderTest.parentDirectory) + #expect(throws: (any Error).self) { + try fs.readFileContents(pathUnderTest.parentDirectory) } } } diff --git a/Tests/BasicsTests/FileSystem/VFSTests.swift b/Tests/BasicsTests/FileSystem/VFSTests.swift index 0f8b5efac2b..ab155200731 100644 --- a/Tests/BasicsTests/FileSystem/VFSTests.swift +++ b/Tests/BasicsTests/FileSystem/VFSTests.swift @@ -39,108 +39,108 @@ func testWithTemporaryDirectory( struct VFSTests { @Test func localBasics() throws { - try withKnownIssue("Permission issues on Windows") { - // tiny PE binary from: https://archive.is/w01DO - let contents: [UInt8] = [ - 0x4d, 0x5a, 0x00, 0x00, 0x50, 0x45, 0x00, 0x00, 0x4c, 0x01, 0x01, 0x00, - 0x6a, 0x2a, 0x58, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x03, 0x01, 0x0b, 0x01, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02 - ] - - let fs = localFileSystem - try withTemporaryFile { [contents] vfsPath in - try withTemporaryDirectory(removeTreeOnDeinit: true) { [contents] tempDirPath in - let file = tempDirPath.appending("best") - try fs.writeFileContents(file, string: "best") - - let sym = tempDirPath.appending("hello") - try fs.createSymbolicLink(sym, pointingAt: file, relative: false) - - let executable = tempDirPath.appending("exec-foo") - try fs.writeFileContents(executable, bytes: ByteString(contents)) - #if !os(Windows) - try fs.chmod(.executable, path: executable, options: []) - #endif - - let executableSym = tempDirPath.appending("exec-sym") - try fs.createSymbolicLink(executableSym, pointingAt: executable, relative: false) - - try fs.createDirectory(tempDirPath.appending("dir")) - try fs.writeFileContents(tempDirPath.appending(components: ["dir", "file"]), bytes: []) - - try VirtualFileSystem.serializeDirectoryTree(tempDirPath, into: AbsolutePath(vfsPath.path), fs: fs, includeContents: [executable]) - } - - let vfs = try VirtualFileSystem(path: vfsPath.path, fs: fs) - - // exists() - #expect(vfs.exists(AbsolutePath("/"))) - #expect(!vfs.exists(AbsolutePath("/does-not-exist"))) - - // isFile() - let filePath = AbsolutePath("/best") - #expect(vfs.exists(filePath)) - #expect(vfs.isFile(filePath)) - #expect(try vfs.getFileInfo(filePath).fileType == .typeRegular) - #expect(!vfs.isDirectory(filePath)) - #expect(!vfs.isFile(AbsolutePath("/does-not-exist"))) - #expect(!vfs.isSymlink(AbsolutePath("/does-not-exist"))) - #expect(throws: (any Error).self) { - try vfs.getFileInfo(AbsolutePath("/does-not-exist")) - } - - // isSymlink() - let symPath = AbsolutePath("/hello") - #expect(vfs.isSymlink(symPath)) - #expect(vfs.isFile(symPath)) - #expect(try vfs.getFileInfo(symPath).fileType == .typeSymbolicLink) - #expect(!vfs.isDirectory(symPath)) - - // isExecutableFile - let executablePath = AbsolutePath("/exec-foo") - let executableSymPath = AbsolutePath("/exec-sym") - #expect(vfs.isExecutableFile(executablePath)) - #expect(vfs.isExecutableFile(executableSymPath)) - #expect(vfs.isSymlink(executableSymPath)) - #expect(!vfs.isExecutableFile(symPath)) - #expect(!vfs.isExecutableFile(filePath)) - #expect(!vfs.isExecutableFile(AbsolutePath("/does-not-exist"))) - #expect(!vfs.isExecutableFile(AbsolutePath("/"))) - - // readFileContents - let execFileContents = try vfs.readFileContents(executablePath) - #expect(execFileContents == ByteString(contents)) - - // isDirectory() - #expect(vfs.isDirectory(AbsolutePath("/"))) - #expect(!vfs.isDirectory(AbsolutePath("/does-not-exist"))) - - // getDirectoryContents() - let dirContents = try vfs.getDirectoryContents(AbsolutePath("/")) - #expect(dirContents.sorted() == ["best", "dir", "exec-foo", "exec-sym", "hello"]) - #expect {try vfs.getDirectoryContents(AbsolutePath("/does-not-exist"))} throws: { error in - (error.localizedDescription == "no such file or directory: \(AbsolutePath("/does-not-exist"))") - } - - let thisDirectoryContents = try vfs.getDirectoryContents(AbsolutePath("/")) - #expect(!thisDirectoryContents.contains(where: { $0 == "." })) - #expect(!thisDirectoryContents.contains(where: { $0 == ".." })) - #expect(thisDirectoryContents.sorted() == ["best", "dir", "exec-foo", "exec-sym", "hello"]) - - let contents = try vfs.getDirectoryContents(AbsolutePath("/dir")) - #expect(contents == ["file"]) - - let fileContents = try vfs.readFileContents(AbsolutePath("/dir/file")) - #expect(fileContents == "") - } - } when: { - ProcessInfo.hostOperatingSystem == .windows + // tiny PE binary from: https://archive.is/w01DO + let contents: [UInt8] = [ + 0x4d, 0x5a, 0x00, 0x00, 0x50, 0x45, 0x00, 0x00, 0x4c, 0x01, 0x01, 0x00, + 0x6a, 0x2a, 0x58, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x03, 0x01, 0x0b, 0x01, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x68, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02 + ] + + let fs = localFileSystem + let vfsPath = try withTemporaryFile(deleteOnClose: true) { $0 } + try withTemporaryDirectory(removeTreeOnDeinit: true) { [contents] tempDirPath in + let file = tempDirPath.appending("best") + try fs.writeFileContents(file, string: "best") + + let sym = tempDirPath.appending("hello") + try fs.createSymbolicLink(sym, pointingAt: file, relative: false) + + let executable = tempDirPath.appending("exec-foo") + try fs.writeFileContents(executable, bytes: ByteString(contents)) +#if !os(Windows) + try fs.chmod(.executable, path: executable, options: []) +#endif + + let executableSym = tempDirPath.appending("exec-sym") + try fs.createSymbolicLink(executableSym, pointingAt: executable, relative: false) + + try fs.createDirectory(tempDirPath.appending("dir")) + try fs.writeFileContents(tempDirPath.appending(components: ["dir", "file"]), bytes: []) + +#if os(Windows) + // Cannot open the file again on windows + try vfsPath.fileHandle.close() +#endif + try VirtualFileSystem.serializeDirectoryTree(tempDirPath, into: AbsolutePath(vfsPath.path), fs: fs, includeContents: [executable]) } + + let vfs = try VirtualFileSystem(path: vfsPath.path, fs: fs) + + // exists() + #expect(vfs.exists(AbsolutePath("/"))) + #expect(!vfs.exists(AbsolutePath("/does-not-exist"))) + + // isFile() + let filePath = AbsolutePath("/best") + #expect(vfs.exists(filePath)) + #expect(vfs.isFile(filePath)) + #expect(try vfs.getFileInfo(filePath).fileType == .typeRegular) + #expect(!vfs.isDirectory(filePath)) + #expect(!vfs.isFile(AbsolutePath("/does-not-exist"))) + #expect(!vfs.isSymlink(AbsolutePath("/does-not-exist"))) + #expect(throws: (any Error).self) { + try vfs.getFileInfo(AbsolutePath("/does-not-exist")) + } + + // isSymlink() + let symPath = AbsolutePath("/hello") + #expect(vfs.isSymlink(symPath)) + #expect(vfs.isFile(symPath)) + #expect(try vfs.getFileInfo(symPath).fileType == .typeSymbolicLink) + #expect(!vfs.isDirectory(symPath)) + + // isExecutableFile + let executablePath = AbsolutePath("/exec-foo") + let executableSymPath = AbsolutePath("/exec-sym") +#if !os(Windows) + #expect(vfs.isExecutableFile(executablePath)) + #expect(vfs.isExecutableFile(executableSymPath)) +#endif + #expect(vfs.isSymlink(executableSymPath)) + #expect(!vfs.isExecutableFile(symPath)) + #expect(!vfs.isExecutableFile(filePath)) + #expect(!vfs.isExecutableFile(AbsolutePath("/does-not-exist"))) + #expect(!vfs.isExecutableFile(AbsolutePath("/"))) + // readFileContents + let execFileContents = try vfs.readFileContents(executablePath) + #expect(execFileContents == ByteString(contents)) + + // isDirectory() + #expect(vfs.isDirectory(AbsolutePath("/"))) + #expect(!vfs.isDirectory(AbsolutePath("/does-not-exist"))) + + // getDirectoryContents() + let dirContents = try vfs.getDirectoryContents(AbsolutePath("/")) + #expect(dirContents.sorted() == ["best", "dir", "exec-foo", "exec-sym", "hello"]) + #expect {try vfs.getDirectoryContents(AbsolutePath("/does-not-exist"))} throws: { error in + (error.localizedDescription == "no such file or directory: \(AbsolutePath("/does-not-exist"))") + } + + let thisDirectoryContents = try vfs.getDirectoryContents(AbsolutePath("/")) + #expect(!thisDirectoryContents.contains(where: { $0 == "." })) + #expect(!thisDirectoryContents.contains(where: { $0 == ".." })) + #expect(thisDirectoryContents.sorted() == ["best", "dir", "exec-foo", "exec-sym", "hello"]) + + let _contents = try vfs.getDirectoryContents(AbsolutePath("/dir")) + #expect(_contents == ["file"]) + + let fileContents = try vfs.readFileContents(AbsolutePath("/dir/file")) + #expect(fileContents == "") } } diff --git a/Tests/BasicsTests/Serialization/SerializedJSONTests.swift b/Tests/BasicsTests/Serialization/SerializedJSONTests.swift index 858abce2cad..3cf2e3a8562 100644 --- a/Tests/BasicsTests/Serialization/SerializedJSONTests.swift +++ b/Tests/BasicsTests/Serialization/SerializedJSONTests.swift @@ -34,18 +34,16 @@ final class SerializedJSONTests: XCTestCase { } func testPathInterpolationFailsOnWindows() throws { - try XCTSkipOnWindows(because: "Expectations are not met. Possibly related to https://github.com/swiftlang/swift-package-manager/issues/8511") - #if os(Windows) var path = try AbsolutePath(validating: #"\\?\C:\Users"#) var json: SerializedJSON = "\(path)" - XCTAssertEqual(json.underlying, #"C:\\Users"#) + XCTAssertEqual(json.underlying, #"\\\\?\\C:\\Users"#) path = try AbsolutePath(validating: #"\\.\UNC\server\share\"#) json = "\(path)" - XCTAssertEqual(json.underlying, #"\\.\\UNC\\server\\share"#) + XCTAssertEqual(json.underlying, #"\\\\.\\UNC\\server\\share"#) #endif } } diff --git a/Tests/FunctionalTests/MiscellaneousTests.swift b/Tests/FunctionalTests/MiscellaneousTests.swift index f10c6b65872..dc2e2c9fa90 100644 --- a/Tests/FunctionalTests/MiscellaneousTests.swift +++ b/Tests/FunctionalTests/MiscellaneousTests.swift @@ -448,7 +448,7 @@ final class MiscellaneousTestCase: XCTestCase { } func testUnicode() async throws { - try XCTSkipOnWindows(because: "Filepath too long error") + try XCTSkipOnWindows(because: "fixture copy does not like the unicode files, needs investigation.") #if !os(Linux) && !os(Android) // TODO: - Linux has trouble with this and needs investigation. try await fixtureXCTest(name: "Miscellaneous/Unicode") { fixturePath in // See the fixture manifest for an explanation of this string. @@ -877,9 +877,8 @@ final class MiscellaneousTestCase: XCTestCase { try await fixtureXCTest(name: "Miscellaneous/RootPackageWithConditionals") { path in _ = try await executeSwiftBuild( path, - extraArgs: ["--build-system=swiftbuild"], env: ["SWIFT_DRIVER_SWIFTSCAN_LIB" : "/this/is/a/bad/path"], - buildSystem: .native, + buildSystem: .swiftbuild, ) } } diff --git a/Tests/FunctionalTests/ResourcesTests.swift b/Tests/FunctionalTests/ResourcesTests.swift index 0d5eeae6a22..f1532a46179 100644 --- a/Tests/FunctionalTests/ResourcesTests.swift +++ b/Tests/FunctionalTests/ResourcesTests.swift @@ -17,13 +17,6 @@ import XCTest final class ResourcesTests: XCTestCase { func testSimpleResources() async throws { - try XCTSkipOnWindows( - because: """ - Invalid path. Possibly related to https://github.com/swiftlang/swift-package-manager/issues/8511 or https://github.com/swiftlang/swift-package-manager/issues/8602 - """, - skipPlatformCi: true, - ) - try await fixtureXCTest(name: "Resources/Simple") { fixturePath in var executables = ["SwiftyResource"] @@ -129,7 +122,6 @@ final class ResourcesTests: XCTestCase { } func testSwiftResourceAccessorDoesNotCauseInconsistentImportWarning() async throws { - try XCTSkipOnWindows(because: "fails to build, need investigation") try await fixtureXCTest(name: "Resources/FoundationlessClient/UtilsWithFoundationPkg") { fixturePath in await XCTAssertBuilds( fixturePath, diff --git a/Tests/PackageGraphPerformanceTests/PackageGraphPerfTests.swift b/Tests/PackageGraphPerformanceTests/PackageGraphPerfTests.swift index 66c98c79c27..179685e17c5 100644 --- a/Tests/PackageGraphPerformanceTests/PackageGraphPerfTests.swift +++ b/Tests/PackageGraphPerformanceTests/PackageGraphPerfTests.swift @@ -167,8 +167,6 @@ final class PackageGraphPerfTests: XCTestCasePerf { } func testRecursiveDependencies() throws { - try XCTSkipOnWindows() - var resolvedTarget = ResolvedModule.mock(packageIdentity: "pkg", name: "t0") for i in 1..<1000 { resolvedTarget = ResolvedModule.mock(packageIdentity: "pkg", name: "t\(i)", deps: resolvedTarget) diff --git a/Tests/PackageLoadingTests/PD_5_6_LoadingTests.swift b/Tests/PackageLoadingTests/PD_5_6_LoadingTests.swift index 04545276b0a..925dc689e0d 100644 --- a/Tests/PackageLoadingTests/PD_5_6_LoadingTests.swift +++ b/Tests/PackageLoadingTests/PD_5_6_LoadingTests.swift @@ -240,8 +240,6 @@ final class PackageDescription5_6LoadingTests: PackageDescriptionLoadingTests { /// Tests access to the package's directory contents. func testPackageContextDirectory() async throws { - try XCTSkipOnWindows(because: "Skipping since this tests does not fully work without the VFS overlay which is currently disabled on Windows") - let content = """ import PackageDescription import Foundation diff --git a/Tests/PackageLoadingTests/PackageBuilderTests.swift b/Tests/PackageLoadingTests/PackageBuilderTests.swift index c7c685ecab9..c9d9dde7a69 100644 --- a/Tests/PackageLoadingTests/PackageBuilderTests.swift +++ b/Tests/PackageLoadingTests/PackageBuilderTests.swift @@ -583,13 +583,8 @@ struct PackageBuilderTests { } } - @Test( - .IssueWindowsLongPath, - .IssueWindowsPathLastConponent, - .IssueWindowsRelativePathAssert - ) + @Test func testTestManifestSearch() throws { - try withKnownIssue(isIntermittent: true) { let fs = InMemoryFileSystem(emptyFiles: "/pkg/foo.swift", "/pkg/footests.swift" @@ -620,9 +615,6 @@ struct PackageBuilderTests { product.check(testEntryPointPath: nil) } } - } when: { - ProcessInfo.hostOperatingSystem == .windows - } } @Test diff --git a/Tests/QueryEngineTests/QueryEngineTests.swift b/Tests/QueryEngineTests/QueryEngineTests.swift index 01c258e8168..f2d8048163b 100644 --- a/Tests/QueryEngineTests/QueryEngineTests.swift +++ b/Tests/QueryEngineTests/QueryEngineTests.swift @@ -100,12 +100,13 @@ private struct Expression: CachingQuery { } struct QueryEngineTests { - @Test( - .bug("https://github.com/swiftlang/swift-package-manager/issues/8541"), - .disabled(if: ProcessInfo.hostOperatingSystem == .windows), - ) + @Test func filePathHashing() throws { +#if os(Windows) + let path = "C:\\root" +#else let path = "/root" +#endif let hashEncoder1 = HashEncoder() try hashEncoder1.encode(FilePath(path)) diff --git a/Tests/WorkspaceTests/ManifestSourceGenerationTests.swift b/Tests/WorkspaceTests/ManifestSourceGenerationTests.swift index 3f956e0913a..d4e97962bc4 100644 --- a/Tests/WorkspaceTests/ManifestSourceGenerationTests.swift +++ b/Tests/WorkspaceTests/ManifestSourceGenerationTests.swift @@ -234,14 +234,18 @@ final class ManifestSourceGenerationTests: XCTestCase { } func testAdvancedFeatures() async throws { - try XCTSkipOnWindows() - let manifestContents = """ // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription + #if os(Windows) + let absolutePath = "c:/a/b/c" + #else + let absolutePath = "/a/b/c" + #endif + let package = Package( name: "MyPackage", products: [ @@ -252,8 +256,8 @@ final class ManifestSourceGenerationTests: XCTestCase { ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(path: "/a/b/c"), - .package(name: "abc", path: "/a/b/d"), + .package(path: absolutePath), + .package(name: "abc", path: absolutePath), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -285,10 +289,6 @@ final class ManifestSourceGenerationTests: XCTestCase { } func testPackageDependencyVariations() async throws { - try XCTSkipOnWindows( - because:"Intermittently fails", - skipPlatformCi: true, - ) let manifestContents = """ // swift-tools-version:5.4 import PackageDescription @@ -871,8 +871,6 @@ final class ManifestSourceGenerationTests: XCTestCase { } func testManifestGenerationWithWarningControlFlags() async throws { - try XCTSkipOnWindows(because: "https://github.com/swiftlang/swift-package-manager/issues/8543: there are compilation errors") - let manifest = Manifest.createRootManifest( displayName: "pkg", path: "/pkg", @@ -916,8 +914,6 @@ final class ManifestSourceGenerationTests: XCTestCase { } func testDefaultIsolation() async throws { - try XCTSkipOnWindows(because: "https://github.com/swiftlang/swift-package-manager/issues/8543: there are compilation errors") - let manifest = Manifest.createRootManifest( displayName: "pkg", path: "/pkg", diff --git a/Tests/WorkspaceTests/RegistryPackageContainerTests.swift b/Tests/WorkspaceTests/RegistryPackageContainerTests.swift index d7eb6a20461..5a1595a53be 100644 --- a/Tests/WorkspaceTests/RegistryPackageContainerTests.swift +++ b/Tests/WorkspaceTests/RegistryPackageContainerTests.swift @@ -24,11 +24,6 @@ import XCTest import struct TSCUtility.Version final class RegistryPackageContainerTests: XCTestCase { - - override func setUpWithError() throws { - try XCTSkipOnWindows() - } - func testToolsVersionCompatibleVersions() async throws { let fs = InMemoryFileSystem() try fs.createMockToolchain() diff --git a/Tests/WorkspaceTests/SourceControlPackageContainerTests.swift b/Tests/WorkspaceTests/SourceControlPackageContainerTests.swift index e73fb132090..1456baefd89 100644 --- a/Tests/WorkspaceTests/SourceControlPackageContainerTests.swift +++ b/Tests/WorkspaceTests/SourceControlPackageContainerTests.swift @@ -125,10 +125,6 @@ private let v1Range: VersionSetSpecifier = .range("1.0.0" ..< "2.0.0") final class SourceControlPackageContainerTests: XCTestCase { func testVprefixVersions() async throws { - try XCTSkipOnWindows(because: """ - https://github.com/swiftlang/swift-package-manager/issues/8578 - """) - let fs = InMemoryFileSystem() try fs.createMockToolchain() @@ -174,10 +170,6 @@ final class SourceControlPackageContainerTests: XCTestCase { } func testVersions() async throws { - try XCTSkipOnWindows(because: """ - https://github.com/swiftlang/swift-package-manager/issues/8578 - """) - let fs = InMemoryFileSystem() try fs.createMockToolchain() @@ -274,10 +266,6 @@ final class SourceControlPackageContainerTests: XCTestCase { } func testPreReleaseVersions() async throws { - try XCTSkipOnWindows(because: """ - https://github.com/swiftlang/swift-package-manager/issues/8578 - """) - let fs = InMemoryFileSystem() try fs.createMockToolchain() @@ -325,10 +313,6 @@ final class SourceControlPackageContainerTests: XCTestCase { } func testSimultaneousVersions() async throws { - try XCTSkipOnWindows(because: """ - https://github.com/swiftlang/swift-package-manager/issues/8578 - """) - let fs = InMemoryFileSystem() try fs.createMockToolchain() diff --git a/Tests/WorkspaceTests/WorkspaceTests.swift b/Tests/WorkspaceTests/WorkspaceTests.swift index eaca8c6e7e9..06b60b79215 100644 --- a/Tests/WorkspaceTests/WorkspaceTests.swift +++ b/Tests/WorkspaceTests/WorkspaceTests.swift @@ -28,20 +28,6 @@ import struct TSCBasic.ByteString import struct TSCUtility.Version final class WorkspaceTests: XCTestCase { - // override func setUpWithError() throws { - // let windowsPassingTests = [ - // #selector(self.testBinaryArtifactsInvalidPath), - // #selector(self.testManifestLoaderDiagnostics), - // #selector(self.testInterpreterFlags), - // #selector(self.testManifestParseError), - // #selector(self.testSimpleAPI) - // ] - // let matches = windowsPassingTests.filter { $0 == self.invocation?.selector} - // if matches.count == 0 { - // try XCTSkipOnWindows() - // } - // } - func testBasics() async throws { let sandbox = AbsolutePath("/tmp/ws/") let fs = InMemoryFileSystem() @@ -8084,10 +8070,6 @@ final class WorkspaceTests: XCTestCase { } func testArtifactChecksum() async throws { - try XCTSkipOnWindows(because: #""" - threw error "\tmp\ws doesn't exist in file system" because there is an issue with InMemoryFileSystem readFileContents(...) on Windows - """#) - let fs = InMemoryFileSystem() try fs.createMockToolchain() let sandbox = AbsolutePath("/tmp/ws/")