blob: c720134ca07db4ce9d400813479ae8c4a249da0e [file] [log] [blame]
Arthur Sheebbcfaf2023-05-08 06:55:23 -07001#!/usr/bin/env bash
2#
3# Copyright (c) 2023 Arm Limited. All rights reserved.
Yann Gautierdc3b1d82024-04-08 15:50:04 +02004# Copyright (c) 2024, STMicroelectronics - All Rights Reserved
Arthur Sheebbcfaf2023-05-08 06:55:23 -07005#
6# SPDX-License-Identifier: BSD-3-Clause
7#
8
9# Generate a YAML file in order to dispatch STM32MP1 runs on LAVA. Note that this
10# script would produce a meaningful output when run via. Jenkins
11#
12# $bin_mode must be set. This script outputs to STDOUT
13
14ci_root="$(readlink -f "$(dirname "$0")/..")"
15source "$ci_root/utils.sh"
16source "$ci_root/stm32mp1_utils.sh"
17payload_type=${payload_type:?}
18build_mode=$(echo $bin_mode | tr '[:lower:]' '[:upper:]')
19layout_file="FlashLayout_sdcard-stm32mp15x-eval.tsv"
20
21# There will be two types of tests, SP_min BL2 and OP-TEE
22# We do SP_min BL2 first
23case "$payload_type" in
24 sp_min_bl2)
25 job_name="SP_min BL2"
Yann Gautierdc3b1d82024-04-08 15:50:04 +020026 rep_bin_file="rep_bin.tar.bz2"
Arthur Sheebbcfaf2023-05-08 06:55:23 -070027 ;;
28esac
29
30if upon "$jenkins_run"; then
31 file_url="$jenkins_url/job/$JOB_NAME/$BUILD_NUMBER/artifact/artefacts/$bin_mode"
32else
33 file_url="file://$workspace/artefacts/$bin_mode"
34fi
35
36rep_bin_url="$file_url/$rep_bin_file"
37flash_layout_url="$file_url/$layout_file"
38
39expand_template "$(dirname "$0")/lava-templates/stm32mp1-boot-test.yaml"