Skip failing test on Linux until upstream fix (#1517)

* Skip failing test on Linux

* Skip more tests

* Skip more tests

* One more skip
This commit is contained in:
Marcos Griselli 2024-10-27 02:34:50 -07:00 committed by GitHub
parent 2cf88e8088
commit a51a548a83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 19 additions and 4 deletions

View File

@ -124,3 +124,11 @@ extension XCTestCase {
describe(name, test) 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
}

View File

@ -8,7 +8,8 @@ import TestSupport
class FixtureTests: XCTestCase { class FixtureTests: XCTestCase {
func testProjectFixture() { func testProjectFixture() throws {
try skipIfNecessary()
describe { describe {
$0.it("generates Test Project") { $0.it("generates Test Project") {
try generateXcodeProject(specPath: fixturePath + "TestProject/AnotherProject/project.yml") try generateXcodeProject(specPath: fixturePath + "TestProject/AnotherProject/project.yml")

View File

@ -1,6 +1,7 @@
import Foundation import Foundation
import PathKit import PathKit
import ProjectSpec import ProjectSpec
import TestSupport
import XcodeGenKit import XcodeGenKit
import XcodeProj import XcodeProj
import XCTest import XCTest
@ -62,6 +63,7 @@ class FixturePerformanceTests: XCTestCase {
} }
func testFixtureGeneration() throws { func testFixtureGeneration() throws {
try skipIfNecessary()
let project = try Project(path: specPath) let project = try Project(path: specPath)
measure { measure {
let generator = ProjectGenerator(project: project) let generator = ProjectGenerator(project: project)
@ -70,6 +72,7 @@ class FixturePerformanceTests: XCTestCase {
} }
func testFixtureWriting() throws { func testFixtureWriting() throws {
try skipIfNecessary()
let project = try Project(path: specPath) let project = try Project(path: specPath)
let generator = ProjectGenerator(project: project) let generator = ProjectGenerator(project: project)
let xcodeProject = try generator.generateXcodeProject(userName: "someUser") let xcodeProject = try generator.generateXcodeProject(userName: "someUser")

View File

@ -275,7 +275,8 @@ class ProjectGeneratorTests: XCTestCase {
} }
} }
func testTargets() { func testTargets() throws {
try skipIfNecessary()
describe { describe {
let project = Project(name: "test", targets: targets) let project = Project(name: "test", targets: targets)

View File

@ -41,7 +41,8 @@ private let uiTest = Target(
class SchemeGeneratorTests: XCTestCase { class SchemeGeneratorTests: XCTestCase {
func testSchemes() { func testSchemes() throws {
try skipIfNecessary()
describe { describe {
let buildTarget = Scheme.BuildTarget(target: .local(app.name)) let buildTarget = Scheme.BuildTarget(target: .local(app.name))

View File

@ -9,7 +9,8 @@ import TestSupport
class SourceGeneratorTests: XCTestCase { class SourceGeneratorTests: XCTestCase {
func testSourceGenerator() { func testSourceGenerator() throws {
try skipIfNecessary()
describe { describe {
let directoryPath = Path("TestDirectory") let directoryPath = Path("TestDirectory")