From e08e40aee400fac54eab33689c1faa07d41fecdd Mon Sep 17 00:00:00 2001 From: Marcos Griselli Date: Thu, 24 Oct 2024 01:27:46 -0700 Subject: [PATCH 1/4] Skip failing test on Linux --- Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 89405629c..b39098196 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -9,7 +9,11 @@ import TestSupport class SourceGeneratorTests: XCTestCase { - func testSourceGenerator() { + func testSourceGenerator() 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 describe { let directoryPath = Path("TestDirectory") From 6df7ab6ae6790b3aa12ce35b7e8deae06e02cc59 Mon Sep 17 00:00:00 2001 From: Marcos Griselli Date: Thu, 24 Oct 2024 01:36:36 -0700 Subject: [PATCH 2/4] Skip more tests --- Tests/PerformanceTests/PerformanceTests.swift | 10 ++++++++++ Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Tests/PerformanceTests/PerformanceTests.swift b/Tests/PerformanceTests/PerformanceTests.swift index 48f604c04..929e9d4a5 100644 --- a/Tests/PerformanceTests/PerformanceTests.swift +++ b/Tests/PerformanceTests/PerformanceTests.swift @@ -62,6 +62,11 @@ class FixturePerformanceTests: XCTestCase { } func testFixtureGeneration() 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 + let project = try Project(path: specPath) measure { let generator = ProjectGenerator(project: project) @@ -70,6 +75,11 @@ class FixturePerformanceTests: XCTestCase { } func testFixtureWriting() 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 + let project = try Project(path: specPath) let generator = ProjectGenerator(project: project) let xcodeProject = try generator.generateXcodeProject(userName: "someUser") diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index b39098196..1f3a5f041 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -11,7 +11,7 @@ class SourceGeneratorTests: XCTestCase { func testSourceGenerator() throws { #if os(Linux) && swift(<6.0.2) - // https://github.com/swiftlang/swift-foundation/pull/1002 + // https://github.com/swiftlang/swift-foundation/pull/1002 throw XCTSkip("Skipping test on Linux until PropertyListDecoder issues are fixed.") #endif describe { From 66d83a4621d01dfa1948ef707d8d6120eac1ebdd Mon Sep 17 00:00:00 2001 From: Marcos Griselli Date: Thu, 24 Oct 2024 01:44:25 -0700 Subject: [PATCH 3/4] Skip more tests --- Sources/TestSupport/TestHelpers.swift | 8 ++++++++ Tests/PerformanceTests/PerformanceTests.swift | 13 +++---------- Tests/XcodeGenKitTests/ProjectGeneratorTests.swift | 3 ++- Tests/XcodeGenKitTests/SchemeGeneratorTests.swift | 3 ++- Tests/XcodeGenKitTests/SourceGeneratorTests.swift | 5 +---- 5 files changed, 16 insertions(+), 16 deletions(-) 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/PerformanceTests/PerformanceTests.swift b/Tests/PerformanceTests/PerformanceTests.swift index 929e9d4a5..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,11 +63,7 @@ class FixturePerformanceTests: XCTestCase { } func testFixtureGeneration() 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 - + try skipIfNecessary() let project = try Project(path: specPath) measure { let generator = ProjectGenerator(project: project) @@ -75,11 +72,7 @@ class FixturePerformanceTests: XCTestCase { } func testFixtureWriting() 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 - + 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 1f3a5f041..bdf955cef 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -10,10 +10,7 @@ import TestSupport class SourceGeneratorTests: XCTestCase { func testSourceGenerator() 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 + try skipIfNecessary() describe { let directoryPath = Path("TestDirectory") From a8b4c0a9c7817fba925130599e262020016b4b59 Mon Sep 17 00:00:00 2001 From: Marcos Griselli Date: Thu, 24 Oct 2024 01:47:43 -0700 Subject: [PATCH 4/4] One more skip --- Tests/FixtureTests/FixtureTests.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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")