File: directory-input-must-scan-after-paths.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 (83 lines) | stat: -rw-r--r-- 2,652 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
77
78
79
80
81
82
83
# TaskA produces "out/a.txt"
# TaskB produces "out/b.txt"
# TaskC lists "out/" as input dependency
# We manually set "must-scan-after-paths" for "out/" to ["out/a.txt", "out/b.txt"]
# so we can defer scanning "out/" until its subpaths are produced.
#
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
# RUN: echo "Output from TaskA for a.txt" > "%t.build/raw.txt"
# RUN: cat %s > "%t.build/build.llbuild"
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build --trace %t.trace > %t.out
# RUN: %{FileCheck} --input-file=%t.out %s
#
# CHECK: TaskB
# CHECK: Output from TaskB for b.txt
# CHECK: TaskA
# CHECK: Output from TaskA for a.txt
# CHECK: TaskC
# CHECK: OUTPUT FROM TASKA FOR A.TXT
# CHECK: OUTPUT FROM TASKB FOR B.TXT
#
# Check that a null build does nothing.
#
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build --trace %t.trace > %t2.out
# RUN: echo "PREVENT-EMPTY-FILE" >> %t2.out
# RUN: %{FileCheck} --input-file=%t2.out %s --check-prefix=CHECK-REBUILD
# CHECK-REBUILD-NOT: TaskB
# CHECK-REBUILD-NOT: Output from TaskB for b.txt
# CHECK-REBUILD-NOT: TaskA
# CHECK-REBUILD-NOT: Output from TaskA for a.txt
# CHECK-REBUILD-NOT: TaskC
# CHECK-REBUILD-NOT: OUTPUT FROM TASKA FOR A.TXT
# CHECK-REBUILD-NOT: OUTPUT FROM TASKB FOR B.TXT
#
# Check modifying a.txt rebuilds TaskA and TaskC
#
# RUN: echo "Updated output from TaskA for a.txt" > "%t.build/raw.txt"
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build --trace %t.trace > %t3.out
# RUN: echo "PREVENT-EMPTY-FILE" >> %t3.out
# RUN: %{FileCheck} --input-file=%t3.out %s --check-prefix=CHECK-MOD-A
# CHECK-MOD-A-NOT: TaskB
# CHECK-MOD-A-NOT: Output from TaskB for b.txt
# CHECK-MOD-A: TaskA
# CHECK-MOD-A: Updated output from TaskA for a.txt
# CHECK-MOD-A: TaskC
# CHECK-MOD-A: UPDATED OUTPUT FROM TASKA FOR A.TXT
# CHECK-MOD-A: OUTPUT FROM TASKB FOR B.TXT

client:
  name: basic
  file-system: default
  perform-ownership-analysis: yes

targets:
  basic: ["final.txt"]

# define the default target to execute when this manifest is loaded.
default: basic

commands:
  taskA:
    tool: shell
    inputs: ["raw.txt"]
    outputs: ["out/a.txt"]
    description: "TaskA"
    args: "cat raw.txt > out/a.txt; cat out/a.txt"
    repair-via-ownership-analysis: true

  taskB:
    tool: shell
    inputs: []
    outputs: ["out/b.txt"]
    description: "TaskB"
    args: "echo 'Output from TaskB for b.txt' > out/b.txt; cat out/b.txt"
    repair-via-ownership-analysis: true

  taskC:
    tool: shell
    inputs: ["out/"]
    outputs: ["final.txt"]
    description: "TaskC"
    args: "cat out/* | tr a-z A-Z > final.txt; cat final.txt"
    repair-via-ownership-analysis: true