Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip failing test on Linux until upstream fix #1517

Merged
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
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