Arthur She | ebbcfaf | 2023-05-08 06:55:23 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright (c) 2023 Arm Limited. All rights reserved. |
Yann Gautier | dc3b1d8 | 2024-04-08 15:50:04 +0200 | [diff] [blame] | 4 | # Copyright (c) 2024, STMicroelectronics - All Rights Reserved |
Arthur She | ebbcfaf | 2023-05-08 06:55:23 -0700 | [diff] [blame] | 5 | # |
| 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 | |
| 14 | ci_root="$(readlink -f "$(dirname "$0")/..")" |
| 15 | source "$ci_root/utils.sh" |
| 16 | source "$ci_root/stm32mp1_utils.sh" |
| 17 | payload_type=${payload_type:?} |
| 18 | build_mode=$(echo $bin_mode | tr '[:lower:]' '[:upper:]') |
| 19 | layout_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 |
| 23 | case "$payload_type" in |
| 24 | sp_min_bl2) |
| 25 | job_name="SP_min BL2" |
Yann Gautier | dc3b1d8 | 2024-04-08 15:50:04 +0200 | [diff] [blame] | 26 | rep_bin_file="rep_bin.tar.bz2" |
Arthur She | ebbcfaf | 2023-05-08 06:55:23 -0700 | [diff] [blame] | 27 | ;; |
| 28 | esac |
| 29 | |
| 30 | if upon "$jenkins_run"; then |
| 31 | file_url="$jenkins_url/job/$JOB_NAME/$BUILD_NUMBER/artifact/artefacts/$bin_mode" |
| 32 | else |
| 33 | file_url="file://$workspace/artefacts/$bin_mode" |
| 34 | fi |
| 35 | |
| 36 | rep_bin_url="$file_url/$rep_bin_file" |
| 37 | flash_layout_url="$file_url/$layout_file" |
| 38 | |
| 39 | expand_template "$(dirname "$0")/lava-templates/stm32mp1-boot-test.yaml" |