@@ -42,6 +42,9 @@ final class CancellatorTests: XCTestCase {
42
42
}
43
43
44
44
func testProcess( ) throws {
45
+ #if !os(macOS)
46
+ try XCTSkipIf ( true , " skipping on non-macOS, signal traps do not work well on docker " )
47
+ #endif
45
48
try withTemporaryDirectory { temporaryDirectory in
46
49
let scriptPath = temporaryDirectory. appending ( component: " script " )
47
50
try localFileSystem. writeFileContents ( scriptPath) {
@@ -59,10 +62,13 @@ final class CancellatorTests: XCTestCase {
59
62
60
63
// outputRedirection used to signal that the process SIGINT traps have been set up
61
64
let startSemaphore = ProcessStartedSemaphore ( term: " process started " )
62
- let process = TSCBasic . Process ( arguments: [ " bash " , scriptPath. pathString] , outputRedirection: . stream(
63
- stdout: startSemaphore. handleOutput,
64
- stderr: startSemaphore. handleOutput
65
- ) )
65
+ let process = TSCBasic . Process (
66
+ arguments: [ " bash " , scriptPath. pathString] ,
67
+ outputRedirection: . stream(
68
+ stdout: startSemaphore. handleOutput,
69
+ stderr: startSemaphore. handleOutput
70
+ )
71
+ )
66
72
67
73
let registrationKey = cancellator. register ( process)
68
74
XCTAssertNotNil ( registrationKey)
@@ -93,6 +99,9 @@ final class CancellatorTests: XCTestCase {
93
99
}
94
100
95
101
func testProcessForceKill( ) throws {
102
+ #if !os(macOS)
103
+ try XCTSkipIf ( true , " skipping on non-macOS, signal traps do not work well on docker " )
104
+ #endif
96
105
try withTemporaryDirectory { temporaryDirectory in
97
106
let scriptPath = temporaryDirectory. appending ( component: " script " )
98
107
try localFileSystem. writeFileContents ( scriptPath) {
@@ -119,10 +128,13 @@ final class CancellatorTests: XCTestCase {
119
128
120
129
// outputRedirection used to signal that the process SIGINT traps have been set up
121
130
let startSemaphore = ProcessStartedSemaphore ( term: " trap installed " )
122
- let process = TSCBasic . Process ( arguments: [ " bash " , scriptPath. pathString] , outputRedirection: . stream(
123
- stdout: startSemaphore. handleOutput,
124
- stderr: startSemaphore. handleOutput
125
- ) )
131
+ let process = TSCBasic . Process (
132
+ arguments: [ " bash " , scriptPath. pathString] ,
133
+ outputRedirection: . stream(
134
+ stdout: startSemaphore. handleOutput,
135
+ stderr: startSemaphore. handleOutput
136
+ )
137
+ )
126
138
let registrationKey = cancellator. register ( process)
127
139
XCTAssertNotNil ( registrationKey)
128
140
0 commit comments