Skip to content

Commit 0a5d278

Browse files
committed
XFAIL TestURL while we root cause this.
1 parent bbd5283 commit 0a5d278

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

TestFoundation/Utilities.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,12 @@ func shouldAttemptXFailTests(_ reason: String) -> Bool {
456456
}
457457
}
458458

459+
func appendTestCaseExpectedToFail<T: XCTestCase>(_ reason: String, _ allTests: [(String, (T) -> () throws -> Void)], into array: inout [XCTestCaseEntry]) {
460+
if shouldAttemptXFailTests(reason) {
461+
array.append(testCase(allTests))
462+
}
463+
}
464+
459465
func testExpectedToFail<T>(_ test: @escaping (T) -> () throws -> Void, _ reason: String) -> (T) -> () throws -> Void {
460466
if shouldAttemptXFailTests(reason) {
461467
return test

TestFoundation/main.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ _ = signal(SIGPIPE, SIG_IGN)
2121
#endif
2222

2323
// For the Swift version of the Foundation tests, we must manually list all test cases here.
24-
XCTMain([
24+
var allTestCases = [
2525
testCase(TestAffineTransform.allTests),
2626
testCase(TestNSArray.allTests),
2727
testCase(TestBundle.allTests),
@@ -80,7 +80,7 @@ XCTMain([
8080
testCase(TestNSTextCheckingResult.allTests),
8181
testCase(TestTimer.allTests),
8282
testCase(TestTimeZone.allTests),
83-
testCase(TestURL.allTests),
83+
/* ⚠️ */ // testCase(TestURL.allTests),
8484
testCase(TestURLComponents.allTests),
8585
testCase(TestURLCredential.allTests),
8686
testCase(TestURLProtectionSpace.allTests),
@@ -112,4 +112,10 @@ XCTMain([
112112
testCase(TestDimension.allTests),
113113
testCase(TestMeasurement.allTests),
114114
testCase(TestNSLock.allTests),
115-
])
115+
]
116+
117+
appendTestCaseExpectedToFail("TestURL is not deleting its temporary directory correctly. https://bugs.swift.org/browse/SR-10538",
118+
TestURL.allTests,
119+
into: &allTestCases)
120+
121+
XCTMain(allTestCases)

0 commit comments

Comments
 (0)