fix: ensure FVP parameter YAML strings are correctly quoted
At present, individual FVP parameters are dumbly-quoted before being
inserted into the YAML. This causes parameters that themselves include
quotes to fail to pass the LAVA job validation stage, because the
strings become incorrectly quoted.
This change uses JQ to create JSON strings out of these parameters,
which are identical to YAML strings.
Change-Id: Ifd74c8695d24af19cc5d4fe9f156ad6f33501849
Signed-off-by: Chris Kay <chris.kay@arm.com>
diff --git a/fvp_utils.sh b/fvp_utils.sh
index 023a2bc..af050c4 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -634,7 +634,7 @@
# include the model parameters
while read -r line; do
if [ -n "$line" ]; then
- yaml_line="- \"${line}\""
+ yaml_line="- $(echo "${line}" | jq -Rsa .)"
sed -i -e "/{BOOT_ARGUMENTS}/i \ \ \ \ $yaml_line" "$yaml_file"
fi
done < "$lava_model_params"