Skip to content

Commit b1ed91d

Browse files
authored
Merge pull request #2935 from spevans/pr_sr_13861_fix
SR-13861: Dont run TestProcess.test_processGroup on Windows
2 parents 311d1b2 + cf4a725 commit b1ed91d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/Foundation/Tests/TestProcess.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ class TestProcess : XCTestCase {
806806
}
807807
}
808808

809+
#if !os(Windows)
809810
func test_processGroup() throws {
810811
// The process group of the child process should be different to the parent's.
811812
let process = Process()
@@ -834,6 +835,7 @@ class TestProcess : XCTestCase {
834835
let parentPgrp = Int(getpgrp())
835836
XCTAssertNotEqual(parentPgrp, childPgrp, "Child process group \(parentPgrp) should not equal parent process group \(childPgrp)")
836837
}
838+
#endif
837839

838840
static var allTests: [(String, (TestProcess) -> () throws -> Void)] {
839841
var tests = [
@@ -864,7 +866,6 @@ class TestProcess : XCTestCase {
864866
("test_currentDirectory", test_currentDirectory),
865867
("test_pipeCloseBeforeLaunch", test_pipeCloseBeforeLaunch),
866868
("test_multiProcesses", test_multiProcesses),
867-
("test_processGroup", test_processGroup),
868869
]
869870

870871
#if !os(Windows)
@@ -873,6 +874,7 @@ class TestProcess : XCTestCase {
873874
("test_interrupt", test_interrupt),
874875
("test_suspend_resume", test_suspend_resume),
875876
("test_fileDescriptorsAreNotInherited", test_fileDescriptorsAreNotInherited),
877+
("test_processGroup", test_processGroup),
876878
]
877879
#endif
878880
return tests

0 commit comments

Comments
 (0)