File: basic.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 (91 lines) | stat: -rw-r--r-- 2,686 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
84
85
86
87
88
89
90
91
# Check basic building functionality.
#
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
# RUN: touch "%t.build/input A"
# RUN: cat %s | sed -e 's#ENV_PATH#%{env}#g' -e 's#SORT_PATH#%{sort}#g' >  %t.build/build.llbuild
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build --trace %t.trace > %t.out
# RUN: %{FileCheck} --input-file=%t.out %s
# RUN: diff "%t.build/input A" %t.build/output
#
# CHECK: env
# CHECK: ENV_KEY=ENV_VALUE_1
# CHECK-NOT: {{^PATH=}}
# CHECK: env
# CHECK: ENV_KEY=ENV_VALUE_2
# CHECK: LLBUILD_TASK_ID={{[a-f0-9]+}}
# CHECK: {{^PATH=random-overridden-path}}
# CHECK: cp 'input A' output

# Check the engine trace.
#
# RUN: %{FileCheck} --input-file=%t.trace %s --check-prefix CHECK-TRACE
#
# CHECK-TRACE: "build-started"
# CHECK-TRACE: "new-rule", "R1", "Tbasic"
# CHECK-TRACE: "new-rule", "R2", "Noutput"
# CHECK-TRACE: "new-rule", "R3", "Ccp-output"
# CHECK-TRACE: "new-rule", "R4", "Ninput A"
# CHECK-TRACE: "build-ended"

# Check that a null build does nothing.
#
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t2.out
# RUN: echo "PREVENT-EMPTY-FILE" >> %t2.out
# RUN: %{FileCheck} --input-file=%t2.out %s --check-prefix=CHECK-REBUILD
#
# CHECK-REBUILD-NOT: cp 'input A' output

# Check that we properly copy the output when the input changes.
#
# RUN: echo mod >> "%t.build/input A"
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t3.out
# RUN: %{FileCheck} --input-file=%t3.out %s --check-prefix=CHECK-REBUILD-MODIFIED
# RUN: diff "%t.build/input A" %t.build/output
#
# CHECK-REBUILD-MODIFIED: cp 'input A' output

# Check that we properly copy the output when the output isn't present.
#
# RUN: rm -rf %t.build/output
# RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t4.out
# RUN: %{FileCheck} --input-file=%t4.out %s --check-prefix=CHECK-REBUILD-OUTPUT-REMOVED
# RUN: diff "%t.build/input A" %t.build/output
#
# CHECK-REBUILD-OUTPUT-REMOVED: cp 'input A' output

client:
  name: basic

targets:
  basic: ["output"]
# define the default target to execute when this manifest is loaded.
default: basic

commands:
  "<env-1>":
    tool: shell
    outputs: ["<env-1>"]
    args: ENV_PATH | SORT_PATH
    env:
      ENV_KEY: ENV_VALUE_1
    inherit-env: false

  "<env-2>":
    tool: shell
    inputs: ["<env-1>"]
    outputs: ["<env-2>"]
    args: ENV_PATH | SORT_PATH
    env:
      ENV_KEY: ENV_VALUE_2
      PATH: random-overridden-path

  cp-output:
    tool: shell
    inputs: ["input A", "<env-1>", "<env-2>"]
    outputs: ["output"]
    description: "cp 'input A' output"
    # FIXME: Design a limited mechanism for substitution. Might be tool specific.
    args: ["cp", "input A", "output"]