Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 3 | # Copyright (c) 2019-2021 Arm Limited. All rights reserved. |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | # Generate a FVP-TFTF model agnostic YAML template. Note that this template is not ready to be |
| 9 | # sent to LAVA by Jenkins so in order to produce file, variables in ${UPPERCASE} must be replaced |
| 10 | # to correct values |
| 11 | |
| 12 | cat <<EOF |
| 13 | device_type: fvp |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 14 | job_name: fvp-tftf-{MODEL} |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 15 | |
| 16 | timeouts: |
| 17 | connection: |
| 18 | minutes: 3 |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 19 | connections: |
| 20 | lava-test-monitor: |
| 21 | minutes: 10 |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 22 | job: |
Leonardo Sandoval | 3f1430d | 2020-11-20 10:33:07 -0600 | [diff] [blame] | 23 | minutes: 60 |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 24 | actions: |
| 25 | auto-login-action: |
| 26 | minutes: 5 |
| 27 | http-download: |
| 28 | minutes: 2 |
| 29 | download-retry: |
| 30 | minutes: 2 |
| 31 | fvp-deploy: |
| 32 | minutes: 5 |
| 33 | |
| 34 | priority: medium |
| 35 | visibility: public |
| 36 | |
| 37 | actions: |
| 38 | - deploy: |
| 39 | to: fvp |
| 40 | images: |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 41 | backup_fip: |
| 42 | url: {BACKUP_FIP} |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 43 | bl1: |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 44 | url: {BL1} |
| 45 | bl2: |
| 46 | url: {BL2} |
| 47 | bl31: |
| 48 | url: {BL31} |
| 49 | bl32: |
| 50 | url: {BL32} |
| 51 | dtb: |
| 52 | url: {DTB} |
Leonardo Sandoval | 44ac9aa | 2020-11-09 12:55:57 -0600 | [diff] [blame] | 53 | el3_payload: |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 54 | url: {EL3_PAYLOAD} |
| 55 | fip: |
| 56 | url: {FIP} |
| 57 | fwu_fip: |
| 58 | url: {FWU_FIP} |
| 59 | image: |
| 60 | url: {IMAGE} |
| 61 | ns_bl1u: |
| 62 | url: {NS_BL1U} |
| 63 | ns_bl2u: |
| 64 | url: {NS_BL2U} |
| 65 | ramdisk: |
| 66 | url: {RAMDISK} |
| 67 | romlib: |
| 68 | url: {ROMLIB} |
| 69 | rootfs: |
| 70 | url: {ROOTFS} |
| 71 | compression: gz |
| 72 | spm: |
| 73 | url: {SPM} |
| 74 | tftf: |
| 75 | url: {TFTF} |
| 76 | tmp: |
| 77 | url: {TMP} |
| 78 | uboot: |
| 79 | url: {UBOOT} |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 80 | |
| 81 | - boot: |
| 82 | method: fvp |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 83 | license_variable: ARMLMD_LICENSE_FILE={ARMLMD_LICENSE_FILE} |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 84 | docker: |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 85 | name: {BOOT_DOCKER_NAME} |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 86 | local: true |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 87 | image: {BOOT_IMAGE_DIR}/{BOOT_IMAGE_BIN} |
| 88 | version_string: {BOOT_VERSION_STRING} |
Leonardo Sandoval | 44ac9aa | 2020-11-09 12:55:57 -0600 | [diff] [blame] | 89 | console_string: 'terminal_0: Listening for serial connection on port (?P<PORT>\d+)' |
Leonardo Sandoval | ce3783b | 2021-03-05 12:04:02 -0600 | [diff] [blame^] | 90 | feedbacks: |
| 91 | - '(?P<NAME>terminal_1): Listening for serial connection on port (?P<PORT>\d+)' |
| 92 | - '(?P<NAME>terminal_2): Listening for serial connection on port (?P<PORT>\d+)' |
| 93 | - '(?P<NAME>terminal_3): Listening for serial connection on port (?P<PORT>\d+)' |
Leonardo Sandoval | 44ac9aa | 2020-11-09 12:55:57 -0600 | [diff] [blame] | 94 | arguments: |
Leonardo Sandoval | 850a486 | 2021-02-16 13:56:18 -0600 | [diff] [blame] | 95 | {BOOT_ARGUMENTS} |
Leonardo Sandoval | 44ac9aa | 2020-11-09 12:55:57 -0600 | [diff] [blame] | 96 | |
| 97 | - test: |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 98 | timeout: |
| 99 | minutes: 30 |
| 100 | |
| 101 | monitors: |
| 102 | - name: TFTF |
| 103 | # LAVA looks for a testsuite start string... |
| 104 | start: 'Booting trusted firmware test framework' |
| 105 | # ...and a testsuite end string. |
| 106 | end: 'Exiting tests.' |
| 107 | |
| 108 | # For each test case, LAVA looks for a string which includes the testcase |
| 109 | # name and result. |
| 110 | pattern: "(?s)> Executing '(?P<test_case_id>.+?(?='))'(.*) TEST COMPLETE\\\s+(?P<result>(Skipped|Passed|Failed|Crashed))" |
| 111 | |
| 112 | # Teach to LAVA how to interpret the TFTF Tests results. |
| 113 | fixupdict: |
| 114 | Passed: pass |
| 115 | Failed: fail |
| 116 | Crashed: fail |
| 117 | Skipped: skip |
| 118 | |
Leonardo Sandoval | d76d1e2 | 2020-10-06 16:02:52 -0500 | [diff] [blame] | 119 | EOF |