Skip to content

Commit dbe20fc

Browse files
committed
Disable exit tests on Ubuntu 20.04 for now
1 parent 1f8e8c9 commit dbe20fc

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Package.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,20 @@ let wasiLibcCSettings: [CSetting] = [
7575
.define("_WASI_EMULATED_MMAN", .when(platforms: [.wasi])),
7676
]
7777

78-
let testOnlySwiftSettings: [SwiftSetting] = [
79-
.define("FOUNDATION_EXIT_TESTS", .when(platforms: [.macOS, .linux])) // The latest Windows toolchain does not yet have exit tests in swift-testing
78+
var testOnlySwiftSettings: [SwiftSetting] = [
79+
// The latest Windows toolchain does not yet have exit tests in swift-testing
80+
.define("FOUNDATION_EXIT_TESTS", .when(platforms: [.macOS, .linux, .openbsd]))
8081
]
8182

83+
#if os(Linux)
84+
import FoundationEssentials
85+
86+
if ProcessInfo.processInfo.operatingSystemVersionString.hasPrefix("Ubuntu 20.") {
87+
// Exit tests currently hang indefinitely on Ubuntu 20.
88+
testOnlySwiftSettings.removeFirst()
89+
}
90+
#endif
91+
8292
let package = Package(
8393
name: "swift-foundation",
8494
platforms: [.macOS("15"), .iOS("18"), .tvOS("18"), .watchOS("11")],

0 commit comments

Comments
 (0)