1# Check that SIGINT handling aborts a build. 2 3# RUN: rm -rf %t.build 4# RUN: mkdir -p %t.build 5# RUN: cp %s %t.build/build.ninja 6# RUN: cp %S/Inputs/wait-for-file %t.build 7# RUN: /bin/bash -c \ 8# RUN: "%{llbuild} ninja build --jobs 1 --chdir %t.build &> %t.out & \ 9# RUN: echo $! > %t.build/llbuild.pid; \ 10# RUN: wait $(cat %t.build/llbuild.pid)" || true 11# RUN: %{FileCheck} --input-file %t.out %s 12# 13# CHECK: [1/{{.*}}] SIGNAL PARENT LLBUILD PROCESS 14# CHECK: cancelling build. 15# 16# FIXME: Disabled on Linux for the time being, it doesn't always pass. See https://bugs.swift.org/browse/SR-3427 17# REQUIRES: platform=Darwin 18 19rule CAT 20 command = cat ${in} > ${out} 21rule SIGNAL 22 description = SIGNAL PARENT LLBUILD PROCESS 23 command = ./wait-for-file llbuild.pid && cat llbuild.pid | xargs kill -SIGINT 24 25build output-1: SIGNAL 26build output: CAT output-1 27