Skip to content

SR-13861: Dont run TestProcess.test_processGroup on Windows #2935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Tests/Foundation/Tests/TestProcess.swift
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ class TestProcess : XCTestCase {
}
}

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

static var allTests: [(String, (TestProcess) -> () throws -> Void)] {
var tests = [
Expand Down Expand Up @@ -864,7 +866,6 @@ class TestProcess : XCTestCase {
("test_currentDirectory", test_currentDirectory),
("test_pipeCloseBeforeLaunch", test_pipeCloseBeforeLaunch),
("test_multiProcesses", test_multiProcesses),
("test_processGroup", test_processGroup),
]

#if !os(Windows)
Expand All @@ -873,6 +874,7 @@ class TestProcess : XCTestCase {
("test_interrupt", test_interrupt),
("test_suspend_resume", test_suspend_resume),
("test_fileDescriptorsAreNotInherited", test_fileDescriptorsAreNotInherited),
("test_processGroup", test_processGroup),
]
#endif
return tests
Expand Down