blob: a09907f874a12f215a6e2642eb54cea32afd9039 [file] [log] [blame]
Leonardo Sandoval9dfdd1b2020-08-06 17:08:11 -05001#!/usr/bin/env bash
Zelalem1af7a7b2020-08-04 17:34:32 -05002#
3# Copyright (c) 2020, 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 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
29juno_revision="${juno_revision:-juno-r0}"
30recovery_img_url="${recovery_img_url:-$(get_recovery_image_url)}"
31
32cat <<EOF
33device_type: juno
34job_name: scp-tests-scmi-juno
35
36tags:
37- $juno_revision
38
39timeouts:
40 # Global timeout value for the whole job.
41 job:
42 minutes: 10
43 actions:
44 lava-test-monitor:
45 seconds: 180
46 connections:
47 lava-test-monitor:
48 seconds: 180
49
50priority: medium
51visibility: public
52
53actions:
54
55- deploy:
56 timeout:
57 minutes: 5
58 to: vemsd
59 recovery_image:
60 url: $recovery_img_url
61 compression: zip
62
63- boot:
64 method: minimal
65
66- test:
67 timeout:
68 minutes: 8
69
70 monitors:
71 #
72 # Monitor no.1
73 # Monitor the results from all the protocols but sensor
74 #
75 - name: SCP-SCMI-NON-SENSOR-PROTOCOL
76 start: 'BL31: Baremetal test suite: scmi'
77 end: 'Protocol Sensor'
78
79 pattern: "\\\[(base|power|system_power|performance)\\\](-|_){(?P<test_case_id>\\\D*)(.*)}(-|_)(query|power|system_power|performance|precondition)_(.*)-01: (?P<result>(CONFORMANT|NON CONFORMANT))"
80
81 fixupdict:
82 "CONFORMANT": pass
83 "NON CONFORMANT": fail
84
85 #
86 # Monitor no.2
87 # Monitor the results from the sensor protocols but for reading_get
88 #
89 - name: SCP-SCMI-SENSOR-PROTOCOL
90 start: 'SENSOR_DISCOVERY:'
91 end: 'query_sensor_description_get_non_existant_sensorid'
92
93 pattern: "\\\[(sensor)\\\](-|_){(?P<test_case_id>\\\D*)(.*)}(-|_)(query|sensor)_(.*)-01: (?P<result>(CONFORMANT|NON CONFORMANT))"
94
95 fixupdict:
96 "CONFORMANT": pass
97 "NON CONFORMANT": fail
98
99 #
100 # Monitor no.3
101 # Monitor the results from each individual sensor when performing the reading_get
102 # This special case is required since the baremetal application does not have
103 # any knowledge of the power state of the system. This results in a blind
104 # call to all the available sensors exposed by the platform, including ones
105 # tied to specific power domains that are in off state. The driver is then
106 # refusing to provide a reading for those sensors, causing a known fail for
107 # the test.
108 # The parser will therefore discard false failures.
109 #
110 - name: SCP-SCMI-SENSOR-PROTOCOL-GET
111 start: 'SENSOR_READING_GET:'
112 end: 'SCMI TEST: END'
113
114 pattern: "SENSOR ID (?P<test_case_id>\\\d+)[\\\n|\\\r](.*)MESSAGE_ID = 0x06[\\\n|\\\r](.*)PARAMETERS (.*)[\\\n|\\\r](.*)CHECK HEADER:(.*)[\\\n|\\\r](.*)CHECK STATUS: (?P<result>(PASSED|FAILED))"
115
116 fixupdict:
117 "PASSED": pass
118 "FAILED": fail
119
120
121
122 #
123 # We have already tested with one agent above and the expectations are the
124 # same for the two agents.
125 # Collect the final results.
126 #
127 - name: SCP-SCMI
128 start: 'Test Suite: SCMI 140'
129 end: 'End of Test Suite: SCMI'
130
131 pattern: "\\\[UT\\\] Test Case: (?P<test_case_id>\\\D*)(.*) Result: (?P<result>[0-9])"
132
133 fixupdict:
134 "0": pass
135 "1": fail
136 "2": fail
137 "3": fail
138 "4": fail
139 "5": fail
140 "6": fail
141 "7": fail
142 "8": fail
143 "9": fail
144
145
146
147EOF