Skip to content

Commit

Permalink
Merge branch 'yonaskolb:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgriselli authored Oct 27, 2024
2 parents 7f6b710 + a51a548 commit 09f8bd5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Sources/TestSupport/TestHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion Tests/FixtureTests/FixtureTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions Tests/PerformanceTests/PerformanceTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Foundation
import PathKit
import ProjectSpec
import TestSupport
import XcodeGenKit
import XcodeProj
import XCTest
Expand Down Expand Up @@ -62,6 +63,7 @@ class FixturePerformanceTests: XCTestCase {
}

func testFixtureGeneration() throws {
try skipIfNecessary()
let project = try Project(path: specPath)
measure {
let generator = ProjectGenerator(project: project)
Expand All @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion Tests/XcodeGenKitTests/ProjectGeneratorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ class ProjectGeneratorTests: XCTestCase {
}
}

func testTargets() {
func testTargets() throws {
try skipIfNecessary()
describe {

let project = Project(name: "test", targets: targets)
Expand Down
3 changes: 2 additions & 1 deletion Tests/XcodeGenKitTests/SchemeGeneratorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion Tests/XcodeGenKitTests/SourceGeneratorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import TestSupport

class SourceGeneratorTests: XCTestCase {

func testSourceGenerator() {
func testSourceGenerator() throws {
try skipIfNecessary()
describe {

let directoryPath = Path("TestDirectory")
Expand Down

0 comments on commit 09f8bd5

Please sign in to comment.