test(validation): negative load-error checks; keep run logs out of the repo
load_errors_check.py loads deliberately broken .tum fixtures in batch on the build under test (like lsp_check.py) and asserts each fails with its specific located message and without a raw traceback. Wired into run.sh just before the main suite, so it runs for every channel. The run validation items now point their sub-instance log at the gitignored report dir, so a GUI run no longer litters the tree with sub_*.log files. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
9
test/validation/load_errors/bad_include.tum
Normal file
9
test/validation/load_errors/bad_include.tum
Normal file
@@ -0,0 +1,9 @@
|
||||
main:
|
||||
name: root
|
||||
steps:
|
||||
- sleep:
|
||||
name: ok
|
||||
timeout: 0
|
||||
# The structural error lives in the included file; the message must point
|
||||
# the user at that file, not at this one.
|
||||
- !include bad_include_inc.tum
|
||||
4
test/validation/load_errors/bad_include_inc.tum
Normal file
4
test/validation/load_errors/bad_include_inc.tum
Normal file
@@ -0,0 +1,4 @@
|
||||
# Included as a bare list of steps. The unknown item below must be reported
|
||||
# with THIS file as the location.
|
||||
- frobnicate_in_include:
|
||||
name: nope
|
||||
6
test/validation/load_errors/group_no_steps.tum
Normal file
6
test/validation/load_errors/group_no_steps.tum
Normal file
@@ -0,0 +1,6 @@
|
||||
main:
|
||||
name: root
|
||||
steps:
|
||||
# A container item (group) without its mandatory 'steps:' list.
|
||||
- group:
|
||||
name: g
|
||||
5
test/validation/load_errors/scalar_body.tum
Normal file
5
test/validation/load_errors/scalar_body.tum
Normal file
@@ -0,0 +1,5 @@
|
||||
main:
|
||||
name: root
|
||||
steps:
|
||||
# The body of an item must be a mapping of parameters, not a scalar.
|
||||
- sleep: 5
|
||||
5
test/validation/load_errors/step_not_mapping.tum
Normal file
5
test/validation/load_errors/step_not_mapping.tum
Normal file
@@ -0,0 +1,5 @@
|
||||
main:
|
||||
name: root
|
||||
steps:
|
||||
# A step that is a bare scalar instead of a '<item>: ...' mapping.
|
||||
- just some text
|
||||
11
test/validation/load_errors/two_steps.tum
Normal file
11
test/validation/load_errors/two_steps.tum
Normal file
@@ -0,0 +1,11 @@
|
||||
main:
|
||||
name: root
|
||||
steps:
|
||||
# Two items wrongly packed under a single '-' marker (a frequent indent
|
||||
# mistake): the second key belongs one '-' lower.
|
||||
- sleep:
|
||||
name: s
|
||||
timeout: 0
|
||||
group:
|
||||
name: g
|
||||
steps: []
|
||||
8
test/validation/load_errors/unknown_action.tum
Normal file
8
test/validation/load_errors/unknown_action.tum
Normal file
@@ -0,0 +1,8 @@
|
||||
main:
|
||||
name: root
|
||||
steps:
|
||||
- console:
|
||||
console_name: c1
|
||||
steps:
|
||||
- opens:
|
||||
device: /dev/ttyUSB0
|
||||
5
test/validation/load_errors/unknown_item.tum
Normal file
5
test/validation/load_errors/unknown_item.tum
Normal file
@@ -0,0 +1,5 @@
|
||||
main:
|
||||
name: root
|
||||
steps:
|
||||
- frobnicate:
|
||||
name: nope
|
||||
Reference in New Issue
Block a user