summaryrefslogtreecommitdiff
path: root/script/gen_stm32mp1_test_yaml.sh
blob: b9d4f597574062ebc9ab018b965fa23fd85df35d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
#
# Copyright (c) 2023 Arm Limited. All rights reserved.
# Copyright (c) 2024, STMicroelectronics - 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"
        fip_bin_file="fip.bin"
        ;;
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"
fip_bin_url="$file_url/$fip_bin_file"
flash_layout_url="$file_url/$layout_file"

expand_template "$(dirname "$0")/lava-templates/stm32mp1-boot-test.yaml"