blob: 9ce046154b1d2928acde0e52b066d4ca0b3ca06f [file] [log] [blame]
Leonardo Sandoval9dfdd1b2020-08-06 17:08:11 -05001#!/usr/bin/env bash
Zelalem1af7a7b2020-08-04 17:34:32 -05002#
Joel Goddarddab56662021-03-15 15:14:27 +00003# Copyright (c) 2021, Arm Limited. All rights reserved.
Zelalem1af7a7b2020-08-04 17:34:32 -05004#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8# Generate a YAML file in order to dispatch Juno runs on LAVA. Note that this
9# script would produce a meaningful output when run via Jenkins
10#
11# This is used exclusively to run a SCMI conformance test for SCP-Firmware on
12# Juno.
13
14ci_root="$(readlink -f "$(dirname "$0")/..")"
15source "$ci_root/utils.sh"
16source "$ci_root/juno_utils.sh"
17
18get_recovery_image_url() {
19 local build_job="tf-build"
20 local bin_mode="debug"
21
22 if upon "$jenkins_run"; then
23 echo "$jenkins_url/job/$JOB_NAME/$BUILD_NUMBER/artifact/artefacts/$bin_mode/juno_recovery.zip"
24 else
25 echo "file://$workspace/artefacts/$bin_mode/juno_recovery.zip"
26 fi
27}
28
Zelalem1af7a7b2020-08-04 17:34:32 -050029recovery_img_url="${recovery_img_url:-$(get_recovery_image_url)}"
30
Manish Pandey7719a382020-09-07 12:30:18 +010031# Allow running juno tests on specific revision(r0/r1/r2).
32juno_revision="${juno_revision:-}"
33if [ ! -z "$juno_revision" ]; then
34 tags="tags:"
35 juno_revision="- ${juno_revision}"
36else
37 tags=""
38fi
39
Chris Kay3d807882022-08-31 16:00:02 +010040expand_template "$(dirname "$0")/lava-templates/juno-scp-tests-scmi.yaml"