blob: 125b1e93d8ab161bf663cb696cdb9e65d0ab2e97 [file] [log] [blame]
# Check the handling of stale file removal.
#
# We use 'grep' to slice out two different subfiles from the same file.
#
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
#
# RUN: grep -A1000 "VERSION-BEGIN-[1]" %s | grep -B10000 "VERSION-END-1" | grep -ve '^--$' > %t.build/build-1.llbuild
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build -f build-1.llbuild > %t.1.out
# RUN: %{FileCheck} --check-prefix CHECK-VERSION-1 --input-file=%t.1.out %s
#
# CHECK-VERSION-1: STALE-FILE-REMOVAL
#
# RUN: grep -A1000 "VERSION-BEGIN-[2]" %s | grep -B10000 "VERSION-END-2" | grep -ve '^--$' > %t.build/build-2.llbuild
# Create stale file
# RUN: touch %t.build/a.out
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build -f build-2.llbuild > %t2.out
# RUN: %{FileCheck} --check-prefix CHECK-VERSION-2 --input-file %t2.out %s
# Check for absence of stale file
# RUN: test ! -f %t.build/a.out
#
# CHECK-VERSION-2: STALE-FILE-REMOVAL-2
#
##### VERSION-BEGIN-1 #####
client:
name: basic
targets:
"": ["<all>"]
commands:
C.1:
tool: stale-file-removal
description: STALE-FILE-REMOVAL
expectedOutputs: ["a.out"]
outputs: ["<all>"]
##### VERSION-END-1 #####
##### VERSION-BEGIN-2 #####
client:
name: basic
targets:
"": ["<all>"]
commands:
C.1:
tool: stale-file-removal
description: STALE-FILE-REMOVAL-2
expectedOutputs: ["b.out"]
outputs: ["<all>"]
##### VERSION-END-2 #####