Skip to content

Commit ff041f6

Browse files
committed
SwiftDriverTests: disable some tests
These tests explicitly hardcode the macOS triple into the test, making them inherently non-portable. Just disable the tests.
1 parent 0e39f4f commit ff041f6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ private func pcmArgsEncodedRelativeModulePath(for moduleName: String, with pcmAr
155155
/// Test that for the given JSON module dependency graph, valid jobs are generated
156156
final class ExplicitModuleBuildTests: XCTestCase {
157157
func testModuleDependencyBuildCommandGeneration() throws {
158+
#if os(macOS)
158159
do {
159160
var driver = try Driver(args: ["swiftc", "-explicit-module-build",
160161
"-module-name", "testModuleDependencyBuildCommandGeneration",
@@ -208,6 +209,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
208209
}
209210
}
210211
}
212+
#endif
211213
}
212214

213215
func testModuleDependencyBuildCommandGenerationWithExternalFramework() throws {
@@ -297,6 +299,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
297299
/// Test generation of explicit module build jobs for dependency modules when the driver
298300
/// is invoked with -explicit-module-build
299301
func testExplicitModuleBuildJobs() throws {
302+
#if os(macOS)
300303
try withTemporaryDirectory { path in
301304
let main = path.appending(component: "testExplicitModuleBuildJobs.swift")
302305
try localFileSystem.writeFileContents(main) {
@@ -444,9 +447,11 @@ final class ExplicitModuleBuildTests: XCTestCase {
444447
}
445448
}
446449
}
450+
#endif
447451
}
448452

449453
func testImmediateModeExplicitModuleBuild() throws {
454+
#if os(macOS)
450455
try withTemporaryDirectory { path in
451456
let main = path.appending(component: "testExplicitModuleBuildJobs.swift")
452457
try localFileSystem.writeFileContents(main) {
@@ -570,6 +575,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
570575
}
571576
}
572577
}
578+
#endif
573579
}
574580

575581
func testExplicitModuleBuildEndToEnd() throws {

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2673,6 +2673,7 @@ final class SwiftDriverTests: XCTestCase {
26732673
}
26742674

26752675
func testClangTargetForExplicitModule() throws {
2676+
#if os(macOS)
26762677
// Check -clang-target is on by defualt when explicit module is on.
26772678
try withTemporaryDirectory { path in
26782679
let main = path.appending(component: "Foo.swift")
@@ -2706,6 +2707,7 @@ final class SwiftDriverTests: XCTestCase {
27062707
job.commandLine.contains(.flag("-clang-target"))
27072708
})
27082709
}
2710+
#endif
27092711
}
27102712

27112713
func testDisableClangTargetForImplicitModule() throws {

0 commit comments

Comments
 (0)