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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
# Check the handling of directory tree structure 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 "created" > %t.build/dir/file2
# 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-NOT: DTS-FILE-CHANGED
# CHECK-MODIFIED: DTS-DIR-CHANGED
# Check that type transitions are detected.
#
# RUN: rm -rf %t.build/missing-dir
# RUN: rm -rf %t.build/file
# RUN: rm -rf %t.build/dir/file2
# RUN: mkdir -p %t.build/file
# RUN: mkdir -p %t.build/dir/file2
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t.type-changed.out
# RUN: %{FileCheck} --check-prefix=CHECK-TYPE-CHANGED --input-file=%t.type-changed.out %s
#
# CHECK-TYPE-CHANGED: DTS-MISSING-CHANGED
# CHECK-TYPE-CHANGED: DTS-FILE-CHANGED
# CHECK-TYPE-CHANGED: DTS-DIR-CHANGED
# Check that a mutation of a file is ignored.
#
# RUN: echo "mutated" >> %t.build/dir/subdir/file
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t.mutated.out
# RUN: echo EOF. >> %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-NOT: DTS-DIR-CHANGED
# CHECK-MUTATED: EOF.
# Check that replacing the file with an equivalent one is ignored.
#
# RUN: rm -f %t.build/dir/subdir/file
# RUN: echo "created" > %t.build/dir/subdir/file
# RUN: echo "mutated" >> %t.build/dir/subdir/file
# RUN: touch -r /dev/null %t.build/dir/subdir
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t.mutated.out
# RUN: echo EOF. >> %t.mutated.out
# RUN: %{FileCheck} --check-prefix=CHECK-REPLACEMENT --input-file=%t.mutated.out %s
#
# CHECK-REPLACEMENT-NOT: DTS-MISSING-CHANGED
# CHECK-REPLACEMENT-NOT: DTS-FILE-CHANGED
# CHECK-REPLACEMENT-NOT: DTS-DIR-CHANGED
# CHECK-REPLACEMENT: EOF.
client:
name: basic
targets:
"": ["<all>"]
nodes:
"missing-dir/":
is-directory-structure: true
"file/":
is-directory-structure: true
"dir/":
is-directory-structure: true
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
|