Skip to content

Commit 3d430a8

Browse files
committed
Skip tests on iOS platform that utilise unavailable APIs
1 parent 57c7b5d commit 3d430a8

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Tests/XcodeProjTests/Scheme/XCSchemeManagementTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ final class XCSchemeManagementTests: XCTestCase {
4545
}
4646

4747
func test_write_produces_no_diff() throws {
48+
throw XCTSkip("'Process' API is unavailable on iOS platform")
49+
#else
4850
let tmpDir = try Path.uniqueTemporary()
4951
defer {
5052
try? tmpDir.delete()
@@ -77,6 +79,7 @@ final class XCSchemeManagementTests: XCTestCase {
7779
let got = try checkedOutput("git", ["status"])
7880
XCTAssertTrue(got?.contains("nothing to commit") ?? false)
7981
}
82+
#endif
8083
}
8184

8285
private var xcschememanagementPath: Path {

Tests/XcodeProjTests/Tests/testWrite.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ func testReadWriteProducesNoDiff(file _: StaticString = #file,
4545
from path: Path,
4646
initModel: (Path) throws -> some Writable) throws
4747
{
48+
#if os(iOS)
49+
throw XCTSkip("'Process' API is unavailable on iOS platform")
50+
#else
4851
let tmpDir = try Path.uniqueTemporary()
4952
defer {
5053
try? tmpDir.delete()
@@ -69,4 +72,5 @@ func testReadWriteProducesNoDiff(file _: StaticString = #file,
6972
let diff = try XCTUnwrap(checkedOutput("git", ["diff"]))
7073
XCTAssertEqual(diff, "")
7174
}
75+
#endif
7276
}

0 commit comments

Comments
 (0)