blob: 2f10a1b1ec78af40be352aa48adfa0f55ef3637d [file] [log] [blame]
This source file is part of the open source project
Copyright 2016 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See for license information
See for Swift project authors
import XCTest
import Basic
import libc
import Utility
import TestSupport
class InterruptHandlerTests: XCTestCase {
func testBasics() throws {
// Disabled because it sometimes hangs the CI, possibly due to
#if false
mktmpdir { path in
let exec = SwiftPMProduct.TestSupportExecutable.path.asString
let waitFile = path.appending(component: "waitFile")
let process = Process(args: exec, "interruptHandlerTest", waitFile.asString)
try process.launch()
guard waitForFile(waitFile) else {
return XCTFail("Couldn't launch the process")
let result = try process.waitUntilExit()
XCTAssertEqual(try result.utf8Output(), "Hello from handler!\n")
static var allTests = [
("testBasics", testBasics),