Skip to content

Commit ef2e70d

Browse files
committed
Revert enabling certain tests on windows
1 parent d7dc932 commit ef2e70d

File tree

11 files changed

+55
-6
lines changed

11 files changed

+55
-6
lines changed

Sources/SourceControl/Repository.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public struct RepositorySpecifier: Hashable, Sendable {
4747
if basename.hasSuffix(".git") {
4848
basename = String(basename.dropLast(4))
4949
}
50-
if basename == "/" || basename == "\\" {
50+
if basename == "/" {
5151
return ""
5252
}
5353
return basename

Sources/_InternalTestSupport/Toolchain.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ package func resolveBinDir() throws -> AbsolutePath {
3737
#if os(macOS)
3838
return try macOSBundleRoot()
3939
#else
40-
guard let cwd = localFileSystem.currentWorkingDirectory else {
41-
fatalError("Current working directory unavailable!")
42-
}
43-
return try AbsolutePath(validating: CommandLine.arguments[0], relativeTo: cwd).parentDirectory
40+
return try AbsolutePath(validating: CommandLine.arguments[0], relativeTo: localFileSystem.currentWorkingDirectory!).parentDirectory
4441
#endif
4542
}
4643

Tests/BasicsTests/AsyncProcessTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ final class AsyncProcessTests: XCTestCase {
5454
}
5555

5656
func testPopenWithBufferLargerThanAllocated() throws {
57+
try XCTSkipOnWindows(because: "https://github.com/swiftlang/swift-package-manager/issues/9031: test fails on windows.")
58+
5759
// Test buffer larger than that allocated.
5860
try withTemporaryFile { file in
5961
let count = 10000

Tests/BasicsTests/Serialization/SerializedJSONTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ final class SerializedJSONTests: XCTestCase {
3434
}
3535

3636
func testPathInterpolationFailsOnWindows() throws {
37+
try XCTSkipOnWindows(because: "Expectations are not met. Possibly related to https://github.com/swiftlang/swift-package-manager/issues/8511")
38+
3739
#if os(Windows)
3840
var path = try AbsolutePath(validating: #"\\?\C:\Users"#)
3941
var json: SerializedJSON = "\(path)"

Tests/FunctionalTests/ResourcesTests.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ import XCTest
1717

1818
final class ResourcesTests: XCTestCase {
1919
func testSimpleResources() async throws {
20+
try XCTSkipOnWindows(
21+
because: """
22+
Invalid path. Possibly related to https://github.com/swiftlang/swift-package-manager/issues/8511 or https://github.com/swiftlang/swift-package-manager/issues/8602
23+
""",
24+
skipPlatformCi: true,
25+
)
26+
2027
try await fixtureXCTest(name: "Resources/Simple") { fixturePath in
2128
var executables = ["SwiftyResource"]
2229

@@ -122,6 +129,7 @@ final class ResourcesTests: XCTestCase {
122129
}
123130

124131
func testSwiftResourceAccessorDoesNotCauseInconsistentImportWarning() async throws {
132+
try XCTSkipOnWindows(because: "fails to build, need investigation")
125133
try await fixtureXCTest(name: "Resources/FoundationlessClient/UtilsWithFoundationPkg") { fixturePath in
126134
await XCTAssertBuilds(
127135
fixturePath,

Tests/PackageGraphPerformanceTests/PackageGraphPerfTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ final class PackageGraphPerfTests: XCTestCasePerf {
167167
}
168168

169169
func testRecursiveDependencies() throws {
170+
try XCTSkipOnWindows()
171+
170172
var resolvedTarget = ResolvedModule.mock(packageIdentity: "pkg", name: "t0")
171173
for i in 1..<1000 {
172174
resolvedTarget = ResolvedModule.mock(packageIdentity: "pkg", name: "t\(i)", deps: resolvedTarget)

Tests/PackageLoadingTests/PackageBuilderTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,9 @@ struct PackageBuilderTests {
584584
}
585585

586586
@Test(
587+
.IssueWindowsLongPath,
588+
.IssueWindowsPathLastComponent,
589+
.IssueWindowsRelativePathAssert,
587590
.tags(
588591
Tag.Feature.PackageType.Executable,
589592
Tag.Feature.PackageType.Library,

Tests/QueryEngineTests/QueryEngineTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ private struct Expression: CachingQuery {
100100
}
101101

102102
struct QueryEngineTests {
103-
@Test
103+
@Test(
104+
.bug("https://github.com/swiftlang/swift-package-manager/issues/8541"),
105+
.disabled(if: ProcessInfo.hostOperatingSystem == .windows),
106+
)
104107
func filePathHashing() throws {
105108
#if os(Windows)
106109
let path = "C:\\root"

Tests/WorkspaceTests/ManifestSourceGenerationTests.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ final class ManifestSourceGenerationTests: XCTestCase {
234234
}
235235

236236
func testAdvancedFeatures() async throws {
237+
try XCTSkipOnWindows()
238+
237239
let manifestContents = """
238240
// swift-tools-version:5.3
239241
// The swift-tools-version declares the minimum version of Swift required to build this package.
@@ -289,6 +291,11 @@ final class ManifestSourceGenerationTests: XCTestCase {
289291
}
290292

291293
func testPackageDependencyVariations() async throws {
294+
try XCTSkipOnWindows(
295+
because:"Intermittently fails",
296+
skipPlatformCi: true,
297+
)
298+
292299
let manifestContents = """
293300
// swift-tools-version:5.4
294301
import PackageDescription
@@ -871,6 +878,8 @@ final class ManifestSourceGenerationTests: XCTestCase {
871878
}
872879

873880
func testManifestGenerationWithWarningControlFlags() async throws {
881+
try XCTSkipOnWindows(because: "https://github.com/swiftlang/swift-package-manager/issues/8543: there are compilation errors")
882+
874883
let manifest = Manifest.createRootManifest(
875884
displayName: "pkg",
876885
path: "/pkg",
@@ -914,6 +923,8 @@ final class ManifestSourceGenerationTests: XCTestCase {
914923
}
915924

916925
func testDefaultIsolation() async throws {
926+
try XCTSkipOnWindows(because: "https://github.com/swiftlang/swift-package-manager/issues/8543: there are compilation errors")
927+
917928
let manifest = Manifest.createRootManifest(
918929
displayName: "pkg",
919930
path: "/pkg",

Tests/WorkspaceTests/RegistryPackageContainerTests.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ import XCTest
2424
import struct TSCUtility.Version
2525

2626
final class RegistryPackageContainerTests: XCTestCase {
27+
28+
override func setUpWithError() throws {
29+
try XCTSkipOnWindows()
30+
}
31+
2732
func testToolsVersionCompatibleVersions() async throws {
2833
let fs = InMemoryFileSystem()
2934
try fs.createMockToolchain()

0 commit comments

Comments
 (0)