diff --git a/.travis.yml b/.travis.yml index 67b1b5b..629e8ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,19 @@ matrix: git: submodules: false env: JOB=SWIFTPM_DARWIN + - sudo: required + dist: trusty + os: linux + language: generic + before_install: + - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" + script: + - swift --version + - swift build + - swift test + git: + submodules: false + env: JOB=SWIFTPM - os: osx osx_image: xcode10.1 script: diff --git a/Sources/Task.swift b/Sources/Task.swift index 685d5d6..25dae5a 100644 --- a/Sources/Task.swift +++ b/Sources/Task.swift @@ -406,12 +406,14 @@ extension Task { process.arguments = self.arguments if shouldBeTerminatedOnParentExit { + #if os(macOS) // This is for terminating subprocesses when the parent process exits. // See https://github.com/Carthage/ReactiveTask/issues/3 for the details. let selector = Selector(("setStartsNewProcessGroup:")) if process.responds(to: selector) { process.perform(selector, with: false as NSNumber) } + #endif } if let cwd = self.workingDirectoryPath { diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..8425149 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest +@testable import ReactiveTaskTests + +Quick.QCKMain([ + StringExtensionSpec.self, + TaskSpec.self, +])