fix: swap LAVA YAML template generation for broken jobs
This change introduces two new hooks:
- `generate_lava_job_template` is expected to generate the initial LAVA
job YAML file (`job.yaml`), which may include fields which are not
yet known
- `generate_lava_job` is used to fill in anything in the LAVA job that
was not known when the job YAML file was generated
Previously, these were incorporated into other hooks almost
arbitrarily, and in some jobs this meant that they were invoked in the
wrong order. These new hooks allow us to be explicit about the order
that these operations occur.
Change-Id: I07f96b91a7ddb04b599ccca674797d4714296c21
Signed-off-by: Chris Kay <chris.kay@arm.com>
diff --git a/run_config/fvp-linux.rootfs+ftpm b/run_config/fvp-linux.rootfs+ftpm
index 530079b..7429946 100644
--- a/run_config/fvp-linux.rootfs+ftpm
+++ b/run_config/fvp-linux.rootfs+ftpm
@@ -1,22 +1,25 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
-post_tf_build() {
- # Get the images for the test.
- edk_url="$tfa_downloads/ftpm/FVP_AARCH64_EFI.fd"
- rootfs_url="$tfa_downloads/ftpm/boot-fat.uefi.img" get_rootfs
- url="$edk_url" saveas="edk2.bin" fetch_file
- archive_file "edk2.bin"
+fetch_tf_resource() {
+ # Get the images for the test.
+ edk_url="$tfa_downloads/ftpm/FVP_AARCH64_EFI.fd"
+ rootfs_url="$tfa_downloads/ftpm/boot-fat.uefi.img" get_rootfs
+ url="$edk_url" saveas="edk2.bin" fetch_file
+ archive_file "edk2.bin"
+}
- # Configure the uarts for tracking.
- uart="0" timeout="600" file="linux-tpm.exp" track_expect
- uart="1" timeout="600" file="tpm-logs.exp" track_expect
- set_run_env "ports_script" "$ci_root/model/ftpm-ports.awk"
- set_run_env "num_uarts" "2"
+generate_lava_job_template() {
+ # Configure the uarts for tracking.
+ uart="0" timeout="600" file="linux-tpm.exp" track_expect
+ uart="1" timeout="600" file="tpm-logs.exp" track_expect
+
+ set_run_env "ports_script" "$ci_root/model/ftpm-ports.awk"
+ set_run_env "num_uarts" "2"
payload_type="linux" gen_fvp_yaml_template
}