summaryrefslogtreecommitdiff
path: root/script/gen_stm32mp1_test_yaml.sh
blob: 6055100cb79a774b2fe8d452d886aa58b19d8946 (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
#!/usr/bin/env bash
#
# Copyright (c) 2019-2022 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#

# Generate a YAML file in order to dispatch Juno 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-linux.yaml"