STM32MP15X-EVAL: Enable LAVA test job submission
It runs SP-min BL2 test
Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: I8638fc5615eaf9da3feb5dea12e1a0ba80fb00a0
diff --git a/script/gen_stm32mp1_test_yaml.sh b/script/gen_stm32mp1_test_yaml.sh
new file mode 100755
index 0000000..445c9e7
--- /dev/null
+++ b/script/gen_stm32mp1_test_yaml.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2023 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# Generate a YAML file in order to dispatch STM32MP1 runs on LAVA. Note that this
+# script would produce a meaningful output when run via. Jenkins
+#
+# $bin_mode must be set. This script outputs to STDOUT
+
+ci_root="$(readlink -f "$(dirname "$0")/..")"
+source "$ci_root/utils.sh"
+source "$ci_root/stm32mp1_utils.sh"
+payload_type=${payload_type:?}
+build_mode=$(echo $bin_mode | tr '[:lower:]' '[:upper:]')
+layout_file="FlashLayout_sdcard-stm32mp15x-eval.tsv"
+
+# There will be two types of tests, SP_min BL2 and OP-TEE
+# We do SP_min BL2 first
+case "$payload_type" in
+ sp_min_bl2)
+ job_name="SP_min BL2"
+ rep_bin_file="tf-a-stm32mp157c-ev1.stm32"
+ ;;
+esac
+
+if upon "$jenkins_run"; then
+ file_url="$jenkins_url/job/$JOB_NAME/$BUILD_NUMBER/artifact/artefacts/$bin_mode"
+else
+ file_url="file://$workspace/artefacts/$bin_mode"
+fi
+
+rep_bin_url="$file_url/$rep_bin_file"
+flash_layout_url="$file_url/$layout_file"
+
+expand_template "$(dirname "$0")/lava-templates/stm32mp1-boot-test.yaml"
diff --git a/script/lava-templates/stm32mp1-boot-test.yaml b/script/lava-templates/stm32mp1-boot-test.yaml
new file mode 100644
index 0000000..9717084
--- /dev/null
+++ b/script/lava-templates/stm32mp1-boot-test.yaml
@@ -0,0 +1,36 @@
+device_type: stm32mp15x-eval
+job_name: stm32mp15x-eval $job_name test - $build_mode
+timeouts:
+ job:
+ minutes: 35
+ action:
+ minutes: 15
+ connection:
+ minutes: 5
+priority: medium
+visibility: public
+actions:
+- deploy:
+ timeout:
+ minutes: 30
+ to: flasher
+ images:
+ tarball:
+ url: https://images.validation.linaro.org/people.linaro.org/~theodore.grey/NEWSTM/stm32mp1_ev1_tarball.tar.gz
+ layout:
+ url: $flash_layout_url
+ rep_bin:
+ url: $rep_bin_url
+ os: oe
+- boot:
+ timeout:
+ minutes: 6
+ method: minimal
+- test:
+ timeout:
+ minutes: 10
+ interactive:
+ - name: int_1
+ prompts: ["Hit any key to stop autoboot"]
+ script:
+ - command: