1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
# Check the handling of directory tree signatures.
#
# We check the node used against three kinds of directories: missing, a file, an
# actual directory.
#
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
# RUN: cp %s %t.build/build.llbuild
# RUN: echo "file" > %t.build/file
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t.initial.out
# RUN: %{FileCheck} --check-prefix=CHECK-INITIAL --input-file=%t.initial.out %s
#
# CHECK-INITIAL: DTS-MISSING-CHANGED
# CHECK-INITIAL: DTS-FILE-CHANGED
# CHECK-INITIAL: DIR-CREATOR
# CHECK-INITIAL: DTS-DIR-CHANGED
# Check that a null build does nothing.
#
# RUN: echo "START." > %t.rebuild.out
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build >> %t.rebuild.out
# RUN: echo "EOF" >> %t.rebuild.out
# RUN: %{FileCheck} --check-prefix=CHECK-REBUILD --input-file=%t.rebuild.out %s
#
# CHECK-REBUILD: START
# CHECK-REBUILD-NOT: DTS-
# CHECK-REBUILD-NEXT: EOF
# Check that modifications are detected.
#
# RUN: mkdir -p %t.build/missing-dir
# RUN: mkdir -p %t.build/dir/subdir
# RUN: echo "created" > %t.build/dir/subdir/file
# RUN: echo "modified" > %t.build/file
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t.modified.out
# RUN: %{FileCheck} --check-prefix=CHECK-MODIFIED --input-file=%t.modified.out %s
#
# CHECK-MODIFIED: DTS-MISSING-CHANGED
# CHECK-MODIFIED: DTS-FILE-CHANGED
# CHECK-MODIFIED: DTS-DIR-CHANGED
# Check that a mutation of a file is detected.
#
# RUN: echo "mutated" >> %t.build/dir/subdir/file
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t.mutated.out
# RUN: %{FileCheck} --check-prefix=CHECK-MUTATED --input-file=%t.mutated.out %s
#
# CHECK-MUTATED-NOT: DTS-MISSING-CHANGED
# CHECK-MUTATED-NOT: DTS-FILE-CHANGED
# CHECK-MUTATED: DTS-DIR-CHANGED
client:
name: basic
targets:
"": ["<all>"]
commands:
C.all:
tool: phony
inputs: ["<D-missing>", "<D-file>", "<D-dir>"]
outputs: ["<all>"]
C.D-missing:
tool: shell
description: DTS-MISSING-CHANGED
inputs: ["missing-dir/"]
outputs: ["<D-missing>"]
args: true
C.D-file:
tool: shell
description: DTS-FILE-CHANGED
inputs: ["file/", "<D-missing>"]
outputs: ["<D-file>"]
args: true
C.dir-creator:
tool: shell
description: DIR-CREATOR
inputs: ["<D-file>"]
outputs: ["dir"]
args: mkdir -p dir
C.D-dir:
tool: shell
description: DTS-DIR-CHANGED
inputs: ["dir/", "<D-file>"]
outputs: ["<D-dir>"]
args: true
|