File: directory-contents-ordering.llbuild

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (76 lines) | stat: -rw-r--r-- 2,110 bytes parent folder | download
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
# Check that directory contents that are actually files correctly trigger the
# production of the file.
# rdar://problem/41142590
#
#
# First pass we set up the database such that a directory contents node points
# to a 'missing' file/directory.
#
# 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 --trace %t.initial.trace --chdir %t.build -f build-1.llbuild
# RUN: %{FileCheck} --check-prefix=CHECK-INITIAL --input-file=%t.initial.trace %s
#
# CHECK-INITIAL: { "new-rule", "[[RULE_NAME:R[0-9]+]]", "Dfile" },
# CHECK-INITIAL: { "rule-needs-to-run", "[[RULE_NAME]]", "never-built" },


# Second pass we add a rule that may now produce that file. As exposed in
# rdar://problem/41142590, clients rely on the explicit dependency on the basal
# node created by 'request()' for this to trigger the production of 'file'
# before execution of the directory contents dependency.
#
# RUN: grep -A1000 "VERSION-BEGIN-[2]" %s | grep -B10000 "VERSION-END-2" | grep -ve '^--$' > %t.build/build-2.llbuild
# RUN: %{llbuild} buildsystem build --serial --trace %t.rebuild.trace --chdir %t.build -f build-2.llbuild
# RUN: %{FileCheck} --check-prefix=CHECK-REBUILD --input-file=%t.rebuild.trace %s
#
# CHECK-REBUILD: { "new-rule", "[[RULE_NAME:R[0-9]+]]", "Dfile" },
# CHECK-REBUILD: { "rule-needs-to-run", "[[RULE_NAME]]", "input-rebuilt", "[[RULE_NAME2:R[0-9]+]]" },

##### VERSION-BEGIN-1 #####

client:
  name: basic

targets:
  "": ["<all>"]

commands:
  a:
    tool: phony
    inputs: ["file/"]
    outputs: ["<afile>"]
  build:
    tool: phony
    inputs: ["<afile>"]
    outputs: ["<all>"]

##### VERSION-END-1 #####

##### VERSION-BEGIN-2 #####

client:
  name: basic

targets:
  "": ["<all>"]

commands:
  a:
    tool: shell
    args: stat file
    inputs: ["file/"]
    outputs: ["<afile>"]

  z:
    tool: shell
    args: touch file
    outputs: ["file"]

  build:
    tool: phony
    inputs: ["<afile>"]
    outputs: ["<all>"]

##### VERSION-END-2 #####