fvp_utils.sh: support Monitor LAVA Test actions
Monitor test actions [1] are useful to define multiple expect matches
through regular expressions and can work together with the current
interactive test actions [2], the latter commonly used for single
expect matches and interaction with the booted model.
The change implied a complete refactor of current defined expect
strings, where now these must define whether is a interactive or
monitor test action through a leading char: 'i' for interactive or 'm'
for monitor.
To provide an short example, if we define the following lava expect script
expect_string+=('m;Booting Trusted Firmware;\
Booting BL31;\
Digest(\s|\w)*:\s(\w{2}\s){16}@: (\w{2}\s){16}@Event(\s|\w)*:\s\w+\s')
expect_string+=('i;buildroot login:')
The CI processes it and converts it into the LAVA job definition [3]:
.
.
- test:
timeout:
minutes: 15
monitors:
- name: tests
start: 'Booting Trusted Firmware'
end: 'Booting BL31'
pattern: 'Digest(\s|\w)*:\s(\w{2}\s){16}'
pattern: ': (\w{2}\s){16}'
pattern: 'Event(\s|\w)*:\s\w+\s'
fixupdict:
PASS: pass
FAIL: fail
- test:
timeout:
minutes: 15
interactive:
- name: uart0_0
prompts: ['buildroot login:']
script:
- name: result
command:
Note that boht type of actions are defined. The lava-expects/README.md
has more information about the details implied on this change.
[1] https://validation.linaro.org/static/docs/v2/monitors.html
[2] https://validation.linaro.org/static/docs/v2/actions-test.html#interactive-test-action
[3] https://tf.validation.linaro.org/scheduler/job/312768
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: Icc05403abf59f30ded60565b8c942d53a91d3990
diff --git a/lava-expect/tftf_fault.exp b/lava-expect/tftf_fault.exp
index d9bce3a..86561e3 100644
--- a/lava-expect/tftf_fault.exp
+++ b/lava-expect/tftf_fault.exp
@@ -8,5 +8,5 @@
# Expect the test to have set a fault message
if [ -n "${tftf_fault_msg}" ]; then
- expect_string+=("${tftf_fault_msg}")
+ expect_string+=("i;${tftf_fault_msg}")
fi