diff --git a/Sources/TestSupport/TestHelpers.swift b/Sources/TestSupport/TestHelpers.swift index 62cbaab33..757856dff 100644 --- a/Sources/TestSupport/TestHelpers.swift +++ b/Sources/TestSupport/TestHelpers.swift @@ -124,3 +124,11 @@ extension XCTestCase { describe(name, test) } } + + +public func skipIfNecessary() throws { + #if os(Linux) && swift(<6.0.2) + // https://github.com/swiftlang/swift-foundation/pull/1002 + throw XCTSkip("Skipping test on Linux until PropertyListDecoder issues are fixed.") + #endif +} \ No newline at end of file diff --git a/Tests/FixtureTests/FixtureTests.swift b/Tests/FixtureTests/FixtureTests.swift index 19cdcdb05..c638098f7 100644 --- a/Tests/FixtureTests/FixtureTests.swift +++ b/Tests/FixtureTests/FixtureTests.swift @@ -8,7 +8,8 @@ import TestSupport class FixtureTests: XCTestCase { - func testProjectFixture() { + func testProjectFixture() throws { + try skipIfNecessary() describe { $0.it("generates Test Project") { try generateXcodeProject(specPath: fixturePath + "TestProject/AnotherProject/project.yml") diff --git a/Tests/PerformanceTests/PerformanceTests.swift b/Tests/PerformanceTests/PerformanceTests.swift index 48f604c04..c1a3d2b03 100644 --- a/Tests/PerformanceTests/PerformanceTests.swift +++ b/Tests/PerformanceTests/PerformanceTests.swift @@ -1,6 +1,7 @@ import Foundation import PathKit import ProjectSpec +import TestSupport import XcodeGenKit import XcodeProj import XCTest @@ -62,6 +63,7 @@ class FixturePerformanceTests: XCTestCase { } func testFixtureGeneration() throws { + try skipIfNecessary() let project = try Project(path: specPath) measure { let generator = ProjectGenerator(project: project) @@ -70,6 +72,7 @@ class FixturePerformanceTests: XCTestCase { } func testFixtureWriting() throws { + try skipIfNecessary() let project = try Project(path: specPath) let generator = ProjectGenerator(project: project) let xcodeProject = try generator.generateXcodeProject(userName: "someUser") diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 5db44698a..194dc0823 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -275,7 +275,8 @@ class ProjectGeneratorTests: XCTestCase { } } - func testTargets() { + func testTargets() throws { + try skipIfNecessary() describe { let project = Project(name: "test", targets: targets) diff --git a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift index 07f63a925..3aad22c5e 100644 --- a/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SchemeGeneratorTests.swift @@ -41,7 +41,8 @@ private let uiTest = Target( class SchemeGeneratorTests: XCTestCase { - func testSchemes() { + func testSchemes() throws { + try skipIfNecessary() describe { let buildTarget = Scheme.BuildTarget(target: .local(app.name)) diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 89405629c..bdf955cef 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -9,7 +9,8 @@ import TestSupport class SourceGeneratorTests: XCTestCase { - func testSourceGenerator() { + func testSourceGenerator() throws { + try skipIfNecessary() describe { let directoryPath = Path("TestDirectory")