refactor: use updated LAVA log names in post-LAVA Expect scripts
The log splitting script (part of the CI jobs repository) now directs
LAVA terminal output to files of the form `lava-${NAME}.log`, where
`NAME` is the name of the terminal captured by the `NAME` regular
expression groups specified by the feedbacks in the LAVA job definition.
A recent edge-case showed that platforms with duplicate terminal names
may exist, which means we must now make several adjustments to how we
enumerate the terminals and name our feedbacks.
The most prominent change is that feedback terminals in the LAVA job
definitions now use the port as the feedback name. The port is the only
mechanism we have for uniquely identifying a UART so given its FVP
terminal printout so, while it isn't pretty, it is at least resilient.
Signed-off-by: Chris Kay <chris.kay@arm.com>
Change-Id: Ib6222e6342e7d795ea1f3f603ba1fed9405cb81b
diff --git a/script/lava-templates/fvp-linux.yaml b/script/lava-templates/fvp-linux.yaml
index f512690..6187e14 100644
--- a/script/lava-templates/fvp-linux.yaml
+++ b/script/lava-templates/fvp-linux.yaml
@@ -62,16 +62,16 @@
local: true
image: ${model_dir}/${model_bin}
version_string: ${version_string}
- console_string: '${ports[$(get_payload_uart "${archive}")]:?}: Listening for serial connection on port (?P<PORT>\d+)'
+ console_string: 'terminal_\w+: Listening for serial connection on port (?P<PORT>$(get_uart_port "${archive:?}" "$(get_payload_uart "${archive:?}")"))'
feedbacks:
-$(for port in "${ports[@]}"; do
- if [ "${port}" = "${ports[$(get_payload_uart "${archive}")]}" ]; then
+$(for uart in $(seq 0 $(( $(get_num_uarts "${archive:?}") - 1 ))); do
+ if [ "${uart}" = "$(get_payload_uart "${archive:?}")" ]; then
continue
fi
cat <<-YAML
- - '(?P<NAME>${port}): Listening for serial connection on port (?P<PORT>\d+)'
+ - 'terminal_\w+: Listening for serial connection on port (?P<NAME>(?P<PORT>$(get_uart_port "${archive:?}" "${uart}")))'
YAML
done)
diff --git a/script/lava-templates/fvp-tftf.yaml b/script/lava-templates/fvp-tftf.yaml
index 73d0a2e..0e49171 100644
--- a/script/lava-templates/fvp-tftf.yaml
+++ b/script/lava-templates/fvp-tftf.yaml
@@ -75,16 +75,16 @@
local: true
image: ${model_dir}/${model_bin}
version_string: ${version_string}
- console_string: '${ports[$(get_payload_uart "${archive}")]:?}: Listening for serial connection on port (?P<PORT>\d+)'
+ console_string: 'terminal_\w+: Listening for serial connection on port (?P<PORT>$(get_uart_port "${archive:?}" "$(get_payload_uart "${archive:?}")"))'
feedbacks:
-$(for port in "${ports[@]}"; do
- if [ "${port}" = "${ports[$(get_payload_uart "${archive}")]}" ]; then
+$(for uart in $(seq 0 $(( $(get_num_uarts "${archive:?}") - 1 ))); do
+ if [ "${uart}" = "$(get_payload_uart "${archive:?}")" ]; then
continue
fi
cat <<-YAML
- - '(?P<NAME>${port}): Listening for serial connection on port (?P<PORT>\d+)'
+ - 'terminal_\w+: Listening for serial connection on port (?P<NAME>(?P<PORT>$(get_uart_port "${archive:?}" "${uart}")))'
YAML
done)