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
|
# Check that directory contents are rebuilt *only* when appropriate.
#
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
# RUN: cp %s %t.build/build.llbuild
# RUN: mkdir -p %t.build/dir
# RUN: %{llbuild} buildsystem build --serial --trace %t.initial.trace --chdir %t.build
# RUN: %{FileCheck} --check-prefix=CHECK-INITIAL --input-file=%t.initial.trace %s
#
# CHECK-INITIAL: { "new-rule", "[[RULE_NAME:R[0-9]+]]", "Ddir" },
# CHECK-INITIAL: { "rule-needs-to-run", "[[RULE_NAME]]", "never-built" },
# A null rebuild shouldn't rebuild the directory.
#
# RUN: %{llbuild} buildsystem build --serial --trace %t.rebuild.trace --chdir %t.build
# RUN: %{FileCheck} --check-prefix=CHECK-REBUILD --input-file=%t.rebuild.trace %s
#
# CHECK-REBUILD: { "new-rule", "[[RULE_NAME:R[0-9]+]]", "Ddir" },
# CHECK-REBUILD: { "rule-does-not-need-to-run", "[[RULE_NAME]]" },
# A null rebuild where the directory itself has been touched unfortunately
# rebuilds (due to rdar://41142590).
#
# Sadly, some of the CI systems run on file systems where the time resolution
# is coarse. We have to inject a pause here to cause this to roll over.
#
# RUN: sleep 1
# RUN: touch %t.build/dir
# RUN: %{llbuild} buildsystem build --serial --trace %t.touch.trace --chdir %t.build
# RUN: %{FileCheck} --check-prefix=CHECK-TOUCH --input-file=%t.touch.trace %s
#
# CHECK-TOUCH: { "new-rule", "[[RULE_NAME:R[0-9]+]]", "Ndir" },
# CHECK-TOUCH: { "rule-needs-to-run", "[[RULE_NAME]]", "invalid-value" },
# A rebuild after adding a new file should rebuild the directory.
#
# RUN: touch %t.build/dir/file
# RUN: %{llbuild} buildsystem build --serial --trace %t.modified.trace --chdir %t.build
# RUN: %{FileCheck} --check-prefix=CHECK-MODIFIED --input-file=%t.modified.trace %s
#
# CHECK-MODIFIED: { "new-rule", "[[RULE_NAME:R[0-9]+]]", "Ddir" },
# CHECK-MODIFIED: { "rule-needs-to-run", "[[RULE_NAME]]", "invalid-value" },
# A rebuild after modifying a file should rebuild the directory.
#
# RUN: echo diff > %t.build/dir/file
# RUN: %{llbuild} buildsystem build --serial --trace %t.modified2.trace --chdir %t.build
# RUN: %{FileCheck} --check-prefix=CHECK-MODIFIED2 --input-file=%t.modified2.trace %s
#
# CHECK-MODIFIED2: { "new-rule", "[[RULE_NAME:R[0-9]+]]", "Ddir" },
# CHECK-MODIFIED2: { "rule-does-not-need-to-run", "[[RULE_NAME]]" },
# CHECK-MODIFIED2: { "new-rule", "[[RULE_NAME2:R[0-9]+]]", "Ndir/file" },
# CHECK-MODIFIED2: { "rule-needs-to-run", "[[RULE_NAME2]]", "invalid-value" },
client:
name: basic
targets:
"": ["<all>"]
commands:
C.all:
tool: phony
inputs: ["dir/"]
outputs: ["<all>"]
|