Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions TestFoundation/Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,10 @@ func shouldAttemptAndroidXFailTests(_ reason: String) -> Bool {
#endif
}

func testCaseExpectedToFail<T: XCTestCase>(_ allTests: [(String, (T) -> () throws -> Void)], _ reason: String) -> XCTestCaseEntry {
return testCase(allTests.map { ($0.0, testExpectedToFail($0.1, "This test suite is disabled: \(reason)")) })
}

func appendTestCaseExpectedToFail<T: XCTestCase>(_ reason: String, _ allTests: [(String, (T) -> () throws -> Void)], into array: inout [XCTestCaseEntry]) {
if shouldAttemptXFailTests(reason) {
array.append(testCase(allTests))
Expand Down
2 changes: 1 addition & 1 deletion TestFoundation/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ var allTestCases = [
testCase(TestURLRequest.allTests),
testCase(TestURLResponse.allTests),
testCase(TestHTTPURLResponse.allTests),
testCase(TestURLSession.allTests),
testCaseExpectedToFail(TestURLSession.allTests, "URLSession test interdependencies are causing intermittent CI issues."),
testCase(TestNSUUID.allTests),
testCase(TestUUID.allTests),
testCase(TestNSValue.allTests),
Expand Down