fix: ensure braces are not interpreted as LAVA macros
Jobs that include boot arguments including braces (`{` and `}`) are
failing because LAVA is treating them as though they are LAVA macros,
and attempting to expand them.
Signed-off-by: Chris Kay <chris.kay@arm.com>
Change-Id: I3afeb755074adf7d60cc7d3baa57eab47ac09d75
diff --git a/fvp_utils.sh b/fvp_utils.sh
index a02e5d6..8985846 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -489,6 +489,11 @@
cp "${yaml_template_file}" "${yaml_file}"
cp "$archive/model_params" "$lava_model_params"
+ # Ensure braces in the FVP model parameters are not accidentally interpreted
+ # as LAVA macros.
+ sed -i -e 's/{/{{/g' "${lava_model_params}"
+ sed -i -e 's/}/}}/g' "${lava_model_params}"
+
# replace metadata macros with real values
for m in "${!metadata_macros[@]}"; do
sed -i -e "s|${metadata_macros[$m]}|${!m}|" "$yaml_file"