fvp_utils.sh: check if template presence before replacing
A template is expected to be created before calling gen_fvp_yaml
function but some tests [1] do not strictly generate the latter so
check if template is present before further function processing.
[1]
tf-l3-boot-tests-spm/fvp-spm-mm,fvp-spm-mm:fvp-tftf.cactus_mm-fip.tftf+bl32-cortexa35x4-debug
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I8d51d0f00cb14f4ddfe37ac369f209e60d238333
diff --git a/fvp_utils.sh b/fvp_utils.sh
index c6e8299..5fb2ae3 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -234,6 +234,11 @@
local yaml_template_file="$workspace/fvp_template.yaml"
local yaml_file="$workspace/fvp.yaml"
+ # this function expects a template, quit if it is not present
+ if [ ! -f "$yaml_template_file" ]; then
+ return
+ fi
+
# must parameters for yaml generation
local model="${model:?}"
local dtb="${dtb:?}"