blob: 09a095851d8f8c2ebf56989a21ee86ee78b14c5b [file] [log] [blame]
Arthur She46611e82022-10-24 20:03:11 -07001#!/usr/bin/env bash
2#
3# Copyright (c) 2019-2022 Arm Limited. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7
8# Generate a YAML file in order to dispatch Juno TFTF runs on LAVA. Note that
9# this 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"
15
16get_bl31_url() {
17 local bin_mode="${bin_mode:?}"
18
19 if upon "$jenkins_run"; then
20 echo "$jenkins_url/job/$JOB_NAME/$BUILD_NUMBER/artifact/artefacts/$bin_mode/bl31.elf"
21 else
22 echo "file://$workspace/artefacts/$bin_mode/bl31.elf"
23 fi
24}
25
26bl31_url="${bl31_url:-$(get_bl31_url)}"
27
28build_mode=$(echo $bin_mode | tr '[:lower:]' '[:upper:]')
29
30cat <<EOF
31device_type: mt8192-asurada-rev1
32job_name: MT8192 Chromebook BL31 depthcharge boot test - $build_mode
33timeouts:
34 job:
35 minutes: 30
36 action:
37 minutes: 2
38 connection:
39 minutes: 5
40priority: medium
41visibility: public
42actions:
43- deploy:
44 timeout:
45 minutes: 5
46 to: flasher
47 images:
48 image:
49 url: https://people.linaro.org/~theodore.grey/trusted-firmware/asurada_tf-a-ci_golden_image.bin.gz
50 bl31:
51 url: $bl31_url
52- boot:
53 timeout:
54 minutes: 2
55 method: minimal
56- test:
57 monitors:
58 - name: "BL31_boot_test"
59 start: "NOTICE: MT8192 bl31_setup"
60 end: "This is a TF-A test build\\\\. Halting\\\\.{3}"
61 pattern: "Starting depthcharge on Asurada\\\\.{3}"
62 fixupdict:
63 '!': pass
64 '': fail