fvp: use common yaml template utilities
Generic template expansion utilities were implemented with the QEMU
platform port. For consistency, and to reduce duplication, other
platforms should use these utilities where possible.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: Ic46442d82ccaf5c3e17c61f702f571d928932907
diff --git a/utils.sh b/utils.sh
index e7d5960..2542277 100644
--- a/utils.sh
+++ b/utils.sh
@@ -185,6 +185,15 @@
readarray -t boot_arguments < "${lava_model_params}"
+ # Source runtime environment variables now so that they are accessible from
+ # the LAVA job template.
+ local run_root="${archive}/run"
+ local run_env="${run_root}/env"
+
+ if [ -f "${run_env}" ]; then
+ source "${run_env}"
+ fi
+
# Generate the LAVA job definition, minus the test expectations
expand_template "${yaml_template_file}" > "${yaml_file}"