Skip to content

Commit 60976ee

Browse files
authored
Tests: Enabled SourceControlTests on Windows (#8453)
Some tests in Tests/SourceControlTests are passing on Windows since upgrading the Git Version in the associated docker image, which was completd in https://github.com/swiftlang/swift-docker/pulls/452 Enable the tests that are skipped. Relates to: #8433 rdar://148248105
1 parent c8d439a commit 60976ee

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

Tests/SourceControlTests/GitRepositoryTests.swift

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ 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-
117113
let validHash = "0123456789012345678901234567890123456789"
118114
XCTAssertNotEqual(GitRepository.Hash(validHash), nil)
119115

@@ -190,10 +186,6 @@ class GitRepositoryTests: XCTestCase {
190186
}
191187

192188
func testSubmoduleRead() throws {
193-
try skipOnWindowsAsTestCurrentlyFails(because: """
194-
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
195-
""")
196-
197189
try testWithTemporaryDirectory { path in
198190
let testRepoPath = path.appending("test-repo")
199191
try makeDirectories(testRepoPath)
@@ -305,10 +297,6 @@ class GitRepositoryTests: XCTestCase {
305297

306298
/// Test the handling of local checkouts.
307299
func testCheckouts() throws {
308-
try skipOnWindowsAsTestCurrentlyFails(because: """
309-
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
310-
""")
311-
312300
try testWithTemporaryDirectory { path in
313301
// Create a test repository.
314302
let testRepoPath = path.appending("test-repo")
@@ -355,10 +343,6 @@ class GitRepositoryTests: XCTestCase {
355343
}
356344

357345
func testFetch() throws {
358-
try skipOnWindowsAsTestCurrentlyFails(because: """
359-
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
360-
""")
361-
362346
try testWithTemporaryDirectory { path in
363347
// Create a repo.
364348
let testRepoPath = path.appending("test-repo")
@@ -398,10 +382,6 @@ class GitRepositoryTests: XCTestCase {
398382
}
399383

400384
func testHasUnpushedCommits() throws {
401-
try skipOnWindowsAsTestCurrentlyFails(because: """
402-
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
403-
""")
404-
405385
try testWithTemporaryDirectory { path in
406386
// Create a repo.
407387
let testRepoPath = path.appending("test-repo")
@@ -438,10 +418,6 @@ class GitRepositoryTests: XCTestCase {
438418
}
439419

440420
func testSetRemote() throws {
441-
try skipOnWindowsAsTestCurrentlyFails(because: """
442-
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
443-
""")
444-
445421
try testWithTemporaryDirectory { path in
446422
// Create a repo.
447423
let testRepoPath = path.appending("test-repo")
@@ -554,10 +530,6 @@ class GitRepositoryTests: XCTestCase {
554530
}
555531

556532
func testCheckoutRevision() throws {
557-
try skipOnWindowsAsTestCurrentlyFails(because: """
558-
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
559-
""")
560-
561533
try testWithTemporaryDirectory { path in
562534
// Create a repo.
563535
let testRepoPath = path.appending("test-repo")
@@ -690,8 +662,6 @@ class GitRepositoryTests: XCTestCase {
690662
}
691663

692664
func testAlternativeObjectStoreValidation() throws {
693-
try skipOnWindowsAsTestCurrentlyFails(because: "test might hang in CI")
694-
695665
try testWithTemporaryDirectory { path in
696666
// Create a repo.
697667
let testRepoPath = path.appending("test-repo")
@@ -762,10 +732,6 @@ class GitRepositoryTests: XCTestCase {
762732
}
763733

764734
func testMissingDefaultBranch() throws {
765-
try skipOnWindowsAsTestCurrentlyFails(because: """
766-
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
767-
""")
768-
769735
try testWithTemporaryDirectory { path in
770736
// Create a repository.
771737
let testRepoPath = path.appending("test-repo")

Tests/SourceControlTests/RepositoryManagerTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ 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-
2622
let fs = localFileSystem
2723
let observability = ObservabilitySystem.makeForTesting()
2824

0 commit comments

Comments
 (0)