Arthur She | 510e840 | 2023-01-23 13:21:28 -0800 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright (c) 2019-2023 Arm Limited. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
Arthur She | d631d02 | 2023-05-12 07:39:16 -0700 | [diff] [blame^] | 8 | # Generate a YAML file in order to dispatch Lazor Chromebook runs on LAVA. Note that |
Arthur She | 510e840 | 2023-01-23 13:21:28 -0800 | [diff] [blame] | 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 | |
| 13 | ci_root="$(readlink -f "$(dirname "$0")/..")" |
| 14 | source "$ci_root/utils.sh" |
| 15 | |
| 16 | get_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 | |
| 26 | bl31_url="${bl31_url:-$(get_bl31_url)}" |
| 27 | |
| 28 | build_mode=$(echo $bin_mode | tr '[:lower:]' '[:upper:]') |
| 29 | |
| 30 | cat <<EOF |
| 31 | device_type: sc7180-trogdor-lazor-limozeen |
| 32 | job_name: SC7180 Chromebook BL31 depthcharge boot test - $build_mode |
| 33 | timeouts: |
| 34 | job: |
| 35 | minutes: 30 |
| 36 | action: |
| 37 | minutes: 5 |
| 38 | connection: |
| 39 | minutes: 5 |
| 40 | priority: medium |
| 41 | visibility: public |
| 42 | actions: |
| 43 | - deploy: |
| 44 | timeout: |
| 45 | minutes: 5 |
| 46 | to: flasher |
| 47 | images: |
| 48 | image: |
| 49 | url: https://images.validation.linaro.org/people.linaro.org/~arthur.she/images/chromebook/lazor/lazor_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 | timeout: |
| 58 | minutes: 5 |
Paul Sokolovsky | e015609 | 2023-02-24 13:34:48 +0700 | [diff] [blame] | 59 | interactive: |
| 60 | - name: int_1 |
| 61 | prompts: ["Starting depthcharge on Lazor"] |
| 62 | script: |
| 63 | - command: |
| 64 | - name: int_2 |
| 65 | prompts: ["This is a TF-A test build. Halting"] |
| 66 | script: |
| 67 | - command: |
Arthur She | 510e840 | 2023-01-23 13:21:28 -0800 | [diff] [blame] | 68 | |
| 69 | EOF |