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
|
# Check error handling.
#
# RUN: %{llbuild} buildsystem parse %s > %t.out 2> %t.err
# RUN: %{FileCheck} --check-prefix CHECK-ERR --input-file %t.err %s
client:
name: basic
# CHECK-ERR: errors.llbuild:[[@LINE+3]]:11: error: invalid version number
# CHECK-ERR-NEXT: version: notaversion
# CHECK-ERR-NEXT: ~~~~~~~~~~~
version: notaversion
tools:
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type in 'tools' map
["bad", "key"]: that
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid value type in 'tools' map
that: ["bad", "value"]
name:
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type for tool in 'tools' map
["bad", "key"]: "bad"
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type for 'attribute' in 'tools' map
# CHECK-ERR: error: invalid value type for 'attribute' in 'tools' map
attribute:
["bad", "key"]: value
"ok": ["bad", "value"]
good:
parameter: value
targets:
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type in 'targets' map
["bad", "key"]: that
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid value type in 'targets' map
that:
bad: value
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid node type in 'targets' map
that: [["bad", "value"]]
good: ["node1", "node2"]
nodes:
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type in 'nodes' map
["bad", "key"]: that
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid value type in 'nodes' map
that: ["bad", "value"]
name:
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type for node in 'nodes' map
["bad", "key"]: "bad"
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type for 'attribute' in 'nodes' map
# CHECK-ERR: error: invalid value type for 'attribute' in 'nodes' map
attribute:
["bad", "key"]: value
"ok": ["bad", "value"]
commands:
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type in 'commands' map
["bad", "key"]: that
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid value type in 'commands' map
that: ["bad", "value"]
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: missing 'tool' key
command0: {}
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: expected 'tool' initial key
command1:
bad: start-key
command2:
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid 'tool' value type
tool: ["bad", "key"]
command3:
tool: "good"
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid value type for 'inputs' command key
inputs: {}
command4:
tool: "good"
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid node type in 'inputs' command key
inputs: [["bad"]]
command5:
tool: "good"
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid value type for 'outputs' command key
outputs: {}
command6:
tool: "good"
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid node type in 'outputs' command key
outputs: [["bad"]]
command7:
tool: "good"
# CHECK-ERR-NOT: error:
# CHECK-ERR: error: invalid key type in 'commands' map
["bad", "key"]: value
# CHECK-ERR: error: invalid key type for 'attribute7' in 'commands' map
# CHECK-ERR: error: invalid value type for 'attribute7' in 'commands' map
attribute7:
["bad", "key"]: value
"ok": ["bad", "value"]
# CHECK-ERR: errors.llbuild:[[@LINE+1]]:2: error: duplicate command in 'commands' map
command7:
tool: "duplicate"
|