Skip to content

Commit 5f2df5f

Browse files
author
Ryan Dingman
committed
Fix Swift 6.2 build
1 parent 955e9c9 commit 5f2df5f

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Tests/SubprocessTests/SubprocessTests+Unix.swift

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,22 @@ extension SubprocessUnixTests {
666666
#expect(catResult.standardError == expected)
667667
}
668668

669-
@Test func testSlowDripRedirectedOutputRedirectToSequence() async throws {
669+
@Test(
670+
.enabled(
671+
if: {
672+
if #available(SubprocessSpan , *) {
673+
true
674+
} else {
675+
false
676+
}
677+
}(),
678+
"This test requires SubprocessSpan"
679+
)
680+
)
681+
func testSlowDripRedirectedOutputRedirectToSequence() async throws {
682+
guard #available(SubprocessSpan , *) else {
683+
return
684+
}
670685
let threshold: Double = 0.5
671686

672687
let script = """
@@ -687,7 +702,7 @@ extension SubprocessUnixTests {
687702
error: .discarded,
688703
body: { (execution, _) in
689704
for try await chunk in execution.standardOutput {
690-
let string = chunk.withUnsafeBytes { String(decoding: $0, as: UTF8.self) }
705+
let string = chunk._withUnsafeBytes { String(decoding: $0, as: UTF8.self) }
691706

692707
if string.hasPrefix("DONE") {
693708
let end = ContinuousClock().now

0 commit comments

Comments
 (0)