Skip to content

Commit e989aea

Browse files
author
Mariusz Borsa
committed
Only run testSanitizeStableAbi on Apple platforms
testSanitizeStableAbi fails on Linux. The SanitizeStableAbi for now only makes sense on Apple OSes, so limiting the test to those rdar://121121682
1 parent 3a7016a commit e989aea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

+4
Original file line numberDiff line numberDiff line change
@@ -2782,6 +2782,9 @@ final class SwiftDriverTests: XCTestCase {
27822782
}
27832783

27842784
func testSanitizeStableAbi() throws {
2785+
#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS))
2786+
throw XCTSkip("-sanitize-stable-abi is only implemented on Darwin")
2787+
#else
27852788
var driver = try Driver(args: ["swiftc", "-sanitize=address", "-sanitize-stable-abi", "Test.swift"])
27862789
guard driver.isFrontendArgSupported(.sanitizeStableAbiEQ) else {
27872790
return
@@ -2803,6 +2806,7 @@ final class SwiftDriverTests: XCTestCase {
28032806
$1.expect(.warning("option '-sanitize-stable-abi' has no effect when 'address' sanitizer is disabled. Use -sanitize=address to enable the sanitizer"))
28042807
}
28052808
}
2809+
#endif
28062810
}
28072811

28082812
func testADDITIONAL_SWIFT_DRIVER_FLAGS() throws {

0 commit comments

Comments
 (0)