Skip to content

Commit c29ba31

Browse files
authored
Merge pull request #957 from compnerd/targets
Tests: remove an unnecessary target host check
2 parents d091012 + 76c7e12 commit c29ba31

File tree

1 file changed

+54
-54
lines changed

1 file changed

+54
-54
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3910,60 +3910,60 @@ final class SwiftDriverTests: XCTestCase {
39103910
serializer.writeDOT(to: &output)
39113911

39123912
let linkerDriver = driver.targetTriple.isDarwin ? executableName("ld") : executableName("clang")
3913-
#if os(Linux) || os(Android)
3914-
XCTAssertEqual(output,
3915-
"""
3916-
digraph Jobs {
3917-
"emitModule (\(executableName("swift-frontend")))" [style=bold];
3918-
"test.swift" [fontsize=12];
3919-
"test.swift" -> "emitModule (\(executableName("swift-frontend")))" [color=blue];
3920-
"test.swiftmodule" [fontsize=12];
3921-
"emitModule (\(executableName("swift-frontend")))" -> "test.swiftmodule" [color=green];
3922-
"test.swiftdoc" [fontsize=12];
3923-
"emitModule (\(executableName("swift-frontend")))" -> "test.swiftdoc" [color=green];
3924-
"test.abi.json" [fontsize=12];
3925-
"emitModule (\(executableName("swift-frontend")))" -> "test.abi.json" [color=green];
3926-
"compile (\(executableName("swift-frontend")))" [style=bold];
3927-
"test.swift" -> "compile (\(executableName("swift-frontend")))" [color=blue];
3928-
"test-1.o" [fontsize=12];
3929-
"compile (\(executableName("swift-frontend")))" -> "test-1.o" [color=green];
3930-
"autolinkExtract (\(executableName("swift-autolink-extract")))" [style=bold];
3931-
"test-1.o" -> "autolinkExtract (\(executableName("swift-autolink-extract")))" [color=blue];
3932-
"test-2.autolink" [fontsize=12];
3933-
"autolinkExtract (\(executableName("swift-autolink-extract")))" -> "test-2.autolink" [color=green];
3934-
"link (\(executableName("clang")))" [style=bold];
3935-
"test-1.o" -> "link (\(executableName("clang")))" [color=blue];
3936-
"test-2.autolink" -> "link (\(executableName("clang")))" [color=blue];
3937-
"\(executableName("test"))" [fontsize=12];
3938-
"link (\(executableName("clang")))" -> "\(executableName("test"))" [color=green];
3939-
}
3940-
3941-
""")
3942-
#else
3943-
XCTAssertEqual(output,
3944-
"""
3945-
digraph Jobs {
3946-
"emitModule (\(executableName("swift-frontend")))" [style=bold];
3947-
"test.swift" [fontsize=12];
3948-
"test.swift" -> "emitModule (\(executableName("swift-frontend")))" [color=blue];
3949-
"test.swiftmodule" [fontsize=12];
3950-
"emitModule (\(executableName("swift-frontend")))" -> "test.swiftmodule" [color=green];
3951-
"test.swiftdoc" [fontsize=12];
3952-
"emitModule (\(executableName("swift-frontend")))" -> "test.swiftdoc" [color=green];
3953-
"test.abi.json" [fontsize=12];
3954-
"emitModule (\(executableName("swift-frontend")))" -> "test.abi.json" [color=green];
3955-
"compile (\(executableName("swift-frontend")))" [style=bold];
3956-
"test.swift" -> "compile (\(executableName("swift-frontend")))" [color=blue];
3957-
"test-1.o" [fontsize=12];
3958-
"compile (\(executableName("swift-frontend")))" -> "test-1.o" [color=green];
3959-
"link (\(linkerDriver))" [style=bold];
3960-
"test-1.o" -> "link (\(linkerDriver))" [color=blue];
3961-
"\(executableName("test"))" [fontsize=12];
3962-
"link (\(linkerDriver))" -> "\(executableName("test"))" [color=green];
3963-
}
3964-
3965-
""")
3966-
#endif
3913+
if driver.targetTriple.objectFormat == .elf {
3914+
XCTAssertEqual(output,
3915+
"""
3916+
digraph Jobs {
3917+
"emitModule (\(executableName("swift-frontend")))" [style=bold];
3918+
"test.swift" [fontsize=12];
3919+
"test.swift" -> "emitModule (\(executableName("swift-frontend")))" [color=blue];
3920+
"test.swiftmodule" [fontsize=12];
3921+
"emitModule (\(executableName("swift-frontend")))" -> "test.swiftmodule" [color=green];
3922+
"test.swiftdoc" [fontsize=12];
3923+
"emitModule (\(executableName("swift-frontend")))" -> "test.swiftdoc" [color=green];
3924+
"test.abi.json" [fontsize=12];
3925+
"emitModule (\(executableName("swift-frontend")))" -> "test.abi.json" [color=green];
3926+
"compile (\(executableName("swift-frontend")))" [style=bold];
3927+
"test.swift" -> "compile (\(executableName("swift-frontend")))" [color=blue];
3928+
"test-1.o" [fontsize=12];
3929+
"compile (\(executableName("swift-frontend")))" -> "test-1.o" [color=green];
3930+
"autolinkExtract (\(executableName("swift-autolink-extract")))" [style=bold];
3931+
"test-1.o" -> "autolinkExtract (\(executableName("swift-autolink-extract")))" [color=blue];
3932+
"test-2.autolink" [fontsize=12];
3933+
"autolinkExtract (\(executableName("swift-autolink-extract")))" -> "test-2.autolink" [color=green];
3934+
"link (\(executableName("clang")))" [style=bold];
3935+
"test-1.o" -> "link (\(executableName("clang")))" [color=blue];
3936+
"test-2.autolink" -> "link (\(executableName("clang")))" [color=blue];
3937+
"\(executableName("test"))" [fontsize=12];
3938+
"link (\(executableName("clang")))" -> "\(executableName("test"))" [color=green];
3939+
}
3940+
3941+
""")
3942+
} else {
3943+
XCTAssertEqual(output,
3944+
"""
3945+
digraph Jobs {
3946+
"emitModule (\(executableName("swift-frontend")))" [style=bold];
3947+
"test.swift" [fontsize=12];
3948+
"test.swift" -> "emitModule (\(executableName("swift-frontend")))" [color=blue];
3949+
"test.swiftmodule" [fontsize=12];
3950+
"emitModule (\(executableName("swift-frontend")))" -> "test.swiftmodule" [color=green];
3951+
"test.swiftdoc" [fontsize=12];
3952+
"emitModule (\(executableName("swift-frontend")))" -> "test.swiftdoc" [color=green];
3953+
"test.abi.json" [fontsize=12];
3954+
"emitModule (\(executableName("swift-frontend")))" -> "test.abi.json" [color=green];
3955+
"compile (\(executableName("swift-frontend")))" [style=bold];
3956+
"test.swift" -> "compile (\(executableName("swift-frontend")))" [color=blue];
3957+
"test-1.o" [fontsize=12];
3958+
"compile (\(executableName("swift-frontend")))" -> "test-1.o" [color=green];
3959+
"link (\(linkerDriver))" [style=bold];
3960+
"test-1.o" -> "link (\(linkerDriver))" [color=blue];
3961+
"\(executableName("test"))" [fontsize=12];
3962+
"link (\(linkerDriver))" -> "\(executableName("test"))" [color=green];
3963+
}
3964+
3965+
""")
3966+
}
39673967
}
39683968

39693969
func testRegressions() throws {

0 commit comments

Comments
 (0)