Skip to content

Commit dcf82c8

Browse files
committed
Disable more tests on Windows
1 parent fab90af commit dcf82c8

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

Tests/SourceControlTests/GitRepositoryTests.swift

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ class GitRepositoryTests: XCTestCase {
110110

111111
/// Check hash validation.
112112
func testGitRepositoryHash() throws {
113+
try skipOnWindowsAsTestCurrentlyFails(because: """
114+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
115+
""")
116+
113117
let validHash = "0123456789012345678901234567890123456789"
114118
XCTAssertNotEqual(GitRepository.Hash(validHash), nil)
115119

@@ -187,6 +191,10 @@ class GitRepositoryTests: XCTestCase {
187191
}
188192

189193
func testSubmoduleRead() throws {
194+
try skipOnWindowsAsTestCurrentlyFails(because: """
195+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
196+
""")
197+
190198
try testWithTemporaryDirectory { path in
191199
let testRepoPath = path.appending("test-repo")
192200
try makeDirectories(testRepoPath)
@@ -298,6 +306,10 @@ class GitRepositoryTests: XCTestCase {
298306

299307
/// Test the handling of local checkouts.
300308
func testCheckouts() throws {
309+
try skipOnWindowsAsTestCurrentlyFails(because: """
310+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
311+
""")
312+
301313
try testWithTemporaryDirectory { path in
302314
// Create a test repository.
303315
let testRepoPath = path.appending("test-repo")
@@ -344,6 +356,10 @@ class GitRepositoryTests: XCTestCase {
344356
}
345357

346358
func testFetch() throws {
359+
try skipOnWindowsAsTestCurrentlyFails(because: """
360+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
361+
""")
362+
347363
try testWithTemporaryDirectory { path in
348364
// Create a repo.
349365
let testRepoPath = path.appending("test-repo")
@@ -383,6 +399,10 @@ class GitRepositoryTests: XCTestCase {
383399
}
384400

385401
func testHasUnpushedCommits() throws {
402+
try skipOnWindowsAsTestCurrentlyFails(because: """
403+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
404+
""")
405+
386406
try testWithTemporaryDirectory { path in
387407
// Create a repo.
388408
let testRepoPath = path.appending("test-repo")
@@ -419,6 +439,10 @@ class GitRepositoryTests: XCTestCase {
419439
}
420440

421441
func testSetRemote() throws {
442+
try skipOnWindowsAsTestCurrentlyFails(because: """
443+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
444+
""")
445+
422446
try testWithTemporaryDirectory { path in
423447
// Create a repo.
424448
let testRepoPath = path.appending("test-repo")
@@ -531,6 +555,10 @@ class GitRepositoryTests: XCTestCase {
531555
}
532556

533557
func testCheckoutRevision() throws {
558+
try skipOnWindowsAsTestCurrentlyFails(because: """
559+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
560+
""")
561+
534562
try testWithTemporaryDirectory { path in
535563
// Create a repo.
536564
let testRepoPath = path.appending("test-repo")
@@ -733,6 +761,10 @@ class GitRepositoryTests: XCTestCase {
733761
}
734762

735763
func testMissingDefaultBranch() throws {
764+
try skipOnWindowsAsTestCurrentlyFails(because: """
765+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
766+
""")
767+
736768
try testWithTemporaryDirectory { path in
737769
// Create a repository.
738770
let testRepoPath = path.appending("test-repo")

Tests/SourceControlTests/RepositoryManagerTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ import XCTest
1919

2020
final class RepositoryManagerTests: XCTestCase {
2121
func testBasics() async throws {
22+
try skipOnWindowsAsTestCurrentlyFails(because: """
23+
Test failed with: 0 [main] sh (9736) C:\\Program Files\\Git\\usr\\bin\\sh.exe: *** fatal error - add_item ("\\??\\C:\\Program Files\\Git", "/", ...) failed, errno 1
24+
""")
25+
2226
let fs = localFileSystem
2327
let observability = ObservabilitySystem.makeForTesting()
2428

0 commit comments

Comments
 (0)