blob: 445c9e7954ec5fd38dc99599cd6d8862361e0bb7 [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.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8# Generate a YAML file in order to dispatch STM32MP1 runs on LAVA. Note that this
9# script would produce a meaningful output when run via. Jenkins
10#
11# $bin_mode must be set. This script outputs to STDOUT
12
13ci_root="$(readlink -f "$(dirname "$0")/..")"
14source "$ci_root/utils.sh"
15source "$ci_root/stm32mp1_utils.sh"
16payload_type=${payload_type:?}
17build_mode=$(echo $bin_mode | tr '[:lower:]' '[:upper:]')
18layout_file="FlashLayout_sdcard-stm32mp15x-eval.tsv"
19
20# There will be two types of tests, SP_min BL2 and OP-TEE
21# We do SP_min BL2 first
22case "$payload_type" in
23 sp_min_bl2)
24 job_name="SP_min BL2"
25 rep_bin_file="tf-a-stm32mp157c-ev1.stm32"
26 ;;
27esac
28
29if upon "$jenkins_run"; then
30 file_url="$jenkins_url/job/$JOB_NAME/$BUILD_NUMBER/artifact/artefacts/$bin_mode"
31else
32 file_url="file://$workspace/artefacts/$bin_mode"
33fi
34
35rep_bin_url="$file_url/$rep_bin_file"
36flash_layout_url="$file_url/$layout_file"
37
38expand_template "$(dirname "$0")/lava-templates/stm32mp1-boot-test.yaml"