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/fvp_utils.sh b/fvp_utils.sh
index eda52ce..d62137c 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -286,21 +286,6 @@
}
-
-# Generates the template for YAML-based LAVA job definitions from a file
-# corresponding to the currently-selected payload, e.g.:
-#
-# - `lava-templates/fvp-linux.yaml`
-# - `lava-templates/fvp-tftf.yaml`
-gen_fvp_yaml_template() {
- local yaml_template_file="${workspace}/fvp_template.yaml"
-
- cp "${ci_root}/script/lava-templates/fvp-${payload_type:?}.yaml" \
- "${yaml_template_file}"
-
- archive_file "${yaml_template_file}"
-}
-
# Generates the final YAML-based LAVA job definition from a template file.
#
# The job definition template is expanded with visibility of all variables that
@@ -357,7 +342,7 @@
test_config="${TEST_CONFIG}"
- declare -A artefact_filters=(
+ declare -A fvp_artefact_filters=(
[backup_fip]="backup_fip.bin"
[bl1]="bl1.bin"
[bl2]="bl2.bin"
@@ -404,7 +389,7 @@
[uboot]="uboot.bin"
)
- declare -A artefact_urls=(
+ declare -A fvp_artefact_urls=(
[backup_fip]="$(gen_bin_url backup_fip.bin)"
[bl1]="$(gen_bin_url bl1.bin)"
[bl2]="$(gen_bin_url bl2.bin)"
@@ -455,7 +440,7 @@
# use macros of the form `{XYZ}`. This is a list of regular expression
# replacements to run on the model parameters file before we add them to the
# LAVA job definition.
- declare -A artefact_macros=(
+ declare -A fvp_artefact_macros=(
["[= ]backup_fip.bin"]="={BACKUP_FIP}"
["[= ]bl1.bin"]="={BL1}"
["[= ]bl2.bin"]="={BL2}"
@@ -503,54 +488,16 @@
["[= ]uboot.bin"]="={UBOOT}"
)
- declare -a artefacts=()
+ declare -a fvp_artefacts
+ filter_artefacts fvp_artefacts fvp_artefact_filters
- for artefact in "${!artefact_filters[@]}"; do
- if grep -E -q "${artefact_filters[${artefact}]}" "${archive}/model_params"; then
- artefacts+=("${artefact}")
- fi
- done
+ lava_model_params="${lava_model_params}" \
+ gen_lava_model_params fvp_artefact_macros
- # Derive LAVA model parameters from the non-LAVA ones
- 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}"
-
- # LAVA expects FVP binary paths as macros, i.e. `{X}` instead of `x.bin`, so
- # replace the file paths in our pre-generated model parameters.
- for regex in "${!artefact_macros[@]}"; do
- sed -i -e "s!${regex}!${artefact_macros[${regex}]}!" \
- "${lava_model_params}"
- done
-
- # Read boot arguments into an array so that the job template file can
- # iterate over them.
- 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}"
-
- # Append expect commands into the job definition through test-interactive commands
- gen_fvp_yaml_expect >> "$yaml_file"
-
- # create job.yaml
- cp "$yaml_file" "$yaml_job_file"
-
- # archive both yamls
- archive_file "$yaml_file"
- archive_file "$yaml_job_file"
+ yaml_template_file="$yaml_template_file" \
+ yaml_file="$yaml_file" \
+ yaml_job_file="$yaml_job_file" \
+ gen_lava_job_def fvp_artefacts fvp_artefact_urls
}
gen_fvp_yaml_expect() {
diff --git a/run_config/fvp-aemv8r.linux b/run_config/fvp-aemv8r.linux
index 086d60c..29c9a9c 100755
--- a/run_config/fvp-aemv8r.linux
+++ b/run_config/fvp-aemv8r.linux
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -22,7 +22,7 @@
}
generate_lava_job_template() {
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-linux b/run_config/fvp-linux
index b77573e..9c5f8bf 100644
--- a/run_config/fvp-linux
+++ b/run_config/fvp-linux
@@ -13,5 +13,5 @@
generate_lava_job_template() {
uart="0" file="linux-rd-busybox.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.bl33 b/run_config/fvp-linux.bl33
index b357fcf..07ec712 100644
--- a/run_config/fvp-linux.bl33
+++ b/run_config/fvp-linux.bl33
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -12,5 +12,5 @@
generate_lava_job_template() {
uart="0" file="linux-bl33.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.morello b/run_config/fvp-linux.morello
index 7cb1460..6c7f1e2 100644
--- a/run_config/fvp-linux.morello
+++ b/run_config/fvp-linux.morello
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -18,5 +18,5 @@
set_uart_port "${archive:?}" 2 5000
set_uart_port "${archive:?}" 3 5002
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.quad b/run_config/fvp-linux.quad
index 1684589..860a395 100644
--- a/run_config/fvp-linux.quad
+++ b/run_config/fvp-linux.quad
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -13,5 +13,5 @@
generate_lava_job_template() {
uart="0" file="linux-rd-busybox.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.rootfs b/run_config/fvp-linux.rootfs
index 6249987..c5cf3c0 100644
--- a/run_config/fvp-linux.rootfs
+++ b/run_config/fvp-linux.rootfs
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -14,5 +14,5 @@
generate_lava_job_template() {
uart="0" timeout="1800" lava_timeout="1500" file="linux-oe.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.rootfs+drtm b/run_config/fvp-linux.rootfs+drtm
index ee22e5e..b0f0736 100644
--- a/run_config/fvp-linux.rootfs+drtm
+++ b/run_config/fvp-linux.rootfs+drtm
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2022, Arm Limited. All rights reserved.
+# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -19,5 +19,5 @@
uart="1" set_primary="1" timeout="700" file="tf-a-drtm.exp" track_expect
set_run_env "num_uarts" "2"
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.rootfs+ftpm b/run_config/fvp-linux.rootfs+ftpm
index bba9024..1cf9293 100644
--- a/run_config/fvp-linux.rootfs+ftpm
+++ b/run_config/fvp-linux.rootfs+ftpm
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -22,5 +22,5 @@
set_run_env "ports_script" "$ci_root/model/ftpm-ports.awk"
set_run_env "num_uarts" "2"
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.rootfs+ftpm_384 b/run_config/fvp-linux.rootfs+ftpm_384
index aa0e02a..bd20ae4 100644
--- a/run_config/fvp-linux.rootfs+ftpm_384
+++ b/run_config/fvp-linux.rootfs+ftpm_384
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -25,5 +25,5 @@
set_run_env "ports_script" "$ci_root/model/ftpm-ports.awk"
set_run_env "num_uarts" "2"
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.rootfs+rst31 b/run_config/fvp-linux.rootfs+rst31
index b262b97..87c63c5 100644
--- a/run_config/fvp-linux.rootfs+rst31
+++ b/run_config/fvp-linux.rootfs+rst31
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -14,5 +14,5 @@
generate_lava_job_template() {
uart="0" timeout="1800" lava_timeout="1500" file="linux-oe-rst-bl31.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.rst31 b/run_config/fvp-linux.rst31
index 21b49c0..268916b 100644
--- a/run_config/fvp-linux.rst31
+++ b/run_config/fvp-linux.rst31
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -14,5 +14,5 @@
uart="0" set_expect_variable "skip_early_boot_msgs" "1"
uart="0" file="linux-rd-busybox.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.sgi b/run_config/fvp-linux.sgi
index 7f6ab24..24502cf 100644
--- a/run_config/fvp-linux.sgi
+++ b/run_config/fvp-linux.sgi
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -25,5 +25,5 @@
set_uart_port "${archive:?}" 3 5001
set_uart_port "${archive:?}" 4 5002
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.stress b/run_config/fvp-linux.stress
index 33ccc06..01a23a3 100644
--- a/run_config/fvp-linux.stress
+++ b/run_config/fvp-linux.stress
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -15,5 +15,5 @@
generate_lava_job_template() {
# No expect tracking as this is an interactive test (test_run=1)
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.tc b/run_config/fvp-linux.tc
index 472e441..6f18b36 100644
--- a/run_config/fvp-linux.tc
+++ b/run_config/fvp-linux.tc
@@ -134,5 +134,5 @@
set_uart_port "${archive:?}" 2 5000
set_uart_port "${archive:?}" 3 5001
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux.uefi.busybox b/run_config/fvp-linux.uefi.busybox
index 37fb814..fef558a 100644
--- a/run_config/fvp-linux.uefi.busybox
+++ b/run_config/fvp-linux.uefi.busybox
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -14,5 +14,5 @@
generate_lava_job_template() {
uart="0" file="linux-rd-busybox.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux32 b/run_config/fvp-linux32
index fef94bb..ded67c5 100644
--- a/run_config/fvp-linux32
+++ b/run_config/fvp-linux32
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -13,5 +13,5 @@
generate_lava_job_template() {
uart="0" file="linux-rd-busybox-aarch32.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux32.rstspmin b/run_config/fvp-linux32.rstspmin
index 736ce8d..a71fb63 100644
--- a/run_config/fvp-linux32.rstspmin
+++ b/run_config/fvp-linux32.rstspmin
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -14,5 +14,5 @@
uart="0" set_expect_variable "skip_early_boot_msgs" "1"
uart="0" file="linux-rd-busybox-aarch32.exp" track_expect
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-linux32.stress b/run_config/fvp-linux32.stress
index 348f050..8f623cf 100644
--- a/run_config/fvp-linux32.stress
+++ b/run_config/fvp-linux32.stress
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -15,5 +15,5 @@
generate_lava_job_template() {
# No expect tracking as this is an interactive test (test_run=1)
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
diff --git a/run_config/fvp-spm b/run_config/fvp-spm
index 7f64b66..1d697c9 100644
--- a/run_config/fvp-spm
+++ b/run_config/fvp-spm
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -10,7 +10,7 @@
}
generate_lava_job_template() {
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-spm+romlib b/run_config/fvp-spm+romlib
index b812936..ef86d0e 100644
--- a/run_config/fvp-spm+romlib
+++ b/run_config/fvp-spm+romlib
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -15,7 +15,7 @@
}
generate_lava_job_template() {
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-spm.48bit_pa b/run_config/fvp-spm.48bit_pa
index 2685157..6c3f37a 100644
--- a/run_config/fvp-spm.48bit_pa
+++ b/run_config/fvp-spm.48bit_pa
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2022, Arm Limited. All rights reserved.
+# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -10,7 +10,7 @@
}
generate_lava_job_template() {
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-spm.edk2 b/run_config/fvp-spm.edk2
index 488e157..503e21d 100644
--- a/run_config/fvp-spm.edk2
+++ b/run_config/fvp-spm.edk2
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -20,5 +20,5 @@
uart="0" file="spm-edk2-uart0.exp" track_expect
uart="2" file="spm-edk2-uart2.exp" track_expect
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-spm.linux b/run_config/fvp-spm.linux
index b79e48a..f9d5e30 100644
--- a/run_config/fvp-spm.linux
+++ b/run_config/fvp-spm.linux
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -23,7 +23,7 @@
}
generate_lava_job_template() {
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-spm.optee b/run_config/fvp-spm.optee
index 654ac5e..28fe783 100644
--- a/run_config/fvp-spm.optee
+++ b/run_config/fvp-spm.optee
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -14,7 +14,7 @@
}
generate_lava_job_template() {
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-spm.optee.sp b/run_config/fvp-spm.optee.sp
index 4fff0ab..d93e9da 100644
--- a/run_config/fvp-spm.optee.sp
+++ b/run_config/fvp-spm.optee.sp
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -24,7 +24,7 @@
}
generate_lava_job_template() {
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-spm.rstbl31 b/run_config/fvp-spm.rstbl31
index 674c765..2b6064f 100644
--- a/run_config/fvp-spm.rstbl31
+++ b/run_config/fvp-spm.rstbl31
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -43,7 +43,7 @@
}
generate_lava_job_template() {
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-spm.sve+amu b/run_config/fvp-spm.sve+amu
index 471c032..e2a18c1 100644
--- a/run_config/fvp-spm.sve+amu
+++ b/run_config/fvp-spm.sve+amu
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -10,7 +10,7 @@
}
generate_lava_job_template() {
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-tc0.spm.tftf b/run_config/fvp-tc0.spm.tftf
index efcf7b8..1f11959 100644
--- a/run_config/fvp-tc0.spm.tftf
+++ b/run_config/fvp-tc0.spm.tftf
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -24,7 +24,7 @@
}
generate_lava_job_template() {
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-tftf b/run_config/fvp-tftf
index 9ab8584..f436e31 100644
--- a/run_config/fvp-tftf
+++ b/run_config/fvp-tftf
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -9,5 +9,5 @@
uart="0" timeout="1200" file="tftf.exp" track_expect
uart="1" file="hold_uart.exp" track_expect
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-tftf.aarch32 b/run_config/fvp-tftf.aarch32
index 66f5699..0a6e287 100644
--- a/run_config/fvp-tftf.aarch32
+++ b/run_config/fvp-tftf.aarch32
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -9,5 +9,5 @@
uart="0" timeout="800" file="tftf-aarch32.exp" track_expect
uart="1" file="hold_uart.exp" track_expect
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-tftf.aarch32+fwu b/run_config/fvp-tftf.aarch32+fwu
index d5be9db..e135dbf 100644
--- a/run_config/fvp-tftf.aarch32+fwu
+++ b/run_config/fvp-tftf.aarch32+fwu
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -25,5 +25,5 @@
generate_lava_job_template() {
uart="0" timeout="900" file="tftf-aarch32.exp" track_expect
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-tftf.cactus_mm b/run_config/fvp-tftf.cactus_mm
index 42e7880..cabf50e 100644
--- a/run_config/fvp-tftf.cactus_mm
+++ b/run_config/fvp-tftf.cactus_mm
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -22,5 +22,5 @@
set_run_env "num_uarts" "3"
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-tftf.fault b/run_config/fvp-tftf.fault
index 4301479..6aaf1a4 100644
--- a/run_config/fvp-tftf.fault
+++ b/run_config/fvp-tftf.fault
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -10,5 +10,5 @@
uart="0" file="hold_uart.exp" track_expect
uart="1" set_primary="1" file="tftf_fault.exp" track_expect
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-tftf.fwu b/run_config/fvp-tftf.fwu
index 502c227..e6fffda 100644
--- a/run_config/fvp-tftf.fwu
+++ b/run_config/fvp-tftf.fwu
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -25,5 +25,5 @@
generate_lava_job_template() {
uart="0" timeout="900" file="tftf.exp" track_expect
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-tftf.gpt b/run_config/fvp-tftf.gpt
index 9b28815..a85a556 100644
--- a/run_config/fvp-tftf.gpt
+++ b/run_config/fvp-tftf.gpt
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -17,5 +17,5 @@
uart="0" file="tftf.exp" track_expect
uart="1" file="hold_uart.exp" track_expect
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-tftf.rme b/run_config/fvp-tftf.rme
index 90b8e97..fac0a60 100644
--- a/run_config/fvp-tftf.rme
+++ b/run_config/fvp-tftf.rme
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
+# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
generate_lava_job_template() {
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
generate_lava_job() {
diff --git a/run_config/fvp-tftf.sgi b/run_config/fvp-tftf.sgi
index 9cfaa29..48a6e7a 100644
--- a/run_config/fvp-tftf.sgi
+++ b/run_config/fvp-tftf.sgi
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2022, Arm Limited. All rights reserved.
+# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -9,5 +9,5 @@
uart="1" timeout="1200" set_primary="1" file="tftf-sgi.exp" track_expect
uart="0" file="hold_uart.exp" track_expect
- payload_type="tftf" gen_fvp_yaml_template
+ payload_type="tftf" gen_yaml_template
}
diff --git a/run_config/fvp-tsp.rootfs b/run_config/fvp-tsp.rootfs
index 7c7ec73..683c538 100644
--- a/run_config/fvp-tsp.rootfs
+++ b/run_config/fvp-tsp.rootfs
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2022, Arm Limited. All rights reserved.
+# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -16,7 +16,7 @@
}
generate_lava_job_template() {
- payload_type="linux" gen_fvp_yaml_template
+ payload_type="linux" gen_yaml_template
}
generate_lava_job() {
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}"