blob: a3f507f519ce20541eeeee9f6d0ec53f64790dcf [file] [log] [blame]
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001#!/usr/bin/env python3
2
3""" lava_job_generator_configs.py:
4
5 Default configurations for lava job generator """
6
7from __future__ import print_function
8
9__copyright__ = """
10/*
11 * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
12 *
13 * SPDX-License-Identifier: BSD-3-Clause
14 *
15 */
16 """
17__author__ = "Minos Galanakis"
18__email__ = "minos.galanakis@linaro.org"
19__project__ = "Trusted Firmware-M Open CI"
20__status__ = "stable"
Minos Galanakisea421232019-06-20 17:11:28 +010021__version__ = "1.1"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010022
23
24def lava_gen_get_config_subset(config,
25 default=True,
26 core=True,
27 regression=True):
28 """ Allow dynamic generation of configuration combinations by subtracking
29 undesired ones """
30
31 from copy import deepcopy
32 cfg = deepcopy(config)
33 tests = deepcopy(config["tests"])
34
35 # Remove all configs not requests by the caller
36 if not default:
37 tests.pop("Default")
Minos Galanakisea421232019-06-20 17:11:28 +010038 if not core:
39 tests.pop("CoreIPC")
40 tests.pop("CoreIPCTfmLevel2")
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010041 if not regression:
42 tests.pop("Regression")
43
44 cfg["tests"] = tests
45 return cfg
46
47
48tfm_mps2_sse_200 = {
Matthew Hart2c2688f2020-05-26 13:09:20 +010049 "templ": "mps2.jinja2",
50 "job_name": "mps2_an521_bl2",
Minos Galanakisafb43152019-09-25 14:17:39 +010051 "device_type": "mps",
Matthew Hart2c2688f2020-05-26 13:09:20 +010052 "job_timeout": 15,
53 "action_timeout": 10,
54 "monitor_timeout": 10,
55 "poweroff_timeout": 1,
56 "recovery_store_url": "https://ci.trustedfirmware.org/userContent/",
57 "platforms": {"AN521": "mps2_sse200_an512.tar.gz"},
58 "compilers": ["GNUARM", "ARMCLANG"],
59 "build_types": ["Debug", "Release", "Minsizerel"],
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010060 "boot_types": ["BL2"],
61 "tests": {
62 'Default': {
63 "binaries": {
Minos Galanakisea421232019-06-20 17:11:28 +010064 "firmware": "tfm_sign.bin",
65 "bootloader": "mcuboot.bin"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010066 },
67 "monitors": [
68 {
69 'name': 'Secure_Test_Suites_Summary',
Minos Galanakis8da148a2019-10-18 17:26:40 +010070 'start': '[Sec Thread]',
Matthew Hartfb6fd362020-03-04 21:03:59 +000071 'end': 'system starting',
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010072 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
73 r'(?P<test_case_id>Secure image '
74 r'initializing)(?P<result>!)',
75 'fixup': {"pass": "!", "fail": ""},
76 'required': ["secure_image_initializing"]
77 } # Monitors
78 ]
79 }, # Default
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010080 'Regression': {
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010081 "binaries": {
Minos Galanakisea421232019-06-20 17:11:28 +010082 "firmware": "tfm_sign.bin",
83 "bootloader": "mcuboot.bin"
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010084 },
85 "monitors": [
86 {
87 'name': 'Secure_Test_Suites_Summary',
88 'start': 'Secure test suites summary',
89 'end': 'End of Secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +010090 'pattern': r"Test suite '(?P<"
91 r"test_case_id>[^\n]+)' has (.*) "
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010092 r"(?P<result>PASSED|FAILED)",
93 'fixup': {"pass": "PASSED", "fail": "FAILED"},
94 'required': [
Minos Galanakis8305a6e2019-04-04 15:55:40 +010095 ("psa_protected_storage_"
96 "s_interface_tests_tfm_sst_test_2xxx_"),
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +010097 "sst_reliability_tests_tfm_sst_test_3xxx_",
Minos Galanakis8305a6e2019-04-04 15:55:40 +010098 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
TudorCretu8b138472019-08-30 10:51:05 +010099 ("psa_internal_trusted_storage_"
100 "s_interface_tests_tfm_its_test_2xxx_"),
101 "its_reliability_tests_tfm_its_test_3xxx_",
Minos Galanakis8305a6e2019-04-04 15:55:40 +0100102 ("audit_"
103 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
104 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
105 ("initial_attestation_service_"
106 "secure_interface_tests_tfm_attest_test_1xxx_"),
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100107 ]
108 },
109 {
110 'name': 'Non_Secure_Test_Suites_Summary',
111 'start': 'Non-secure test suites summary',
112 'end': r'End of Non-secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100113 'pattern': r"Test suite '(?P<"
114 r"test_case_id>[^\n]+)' has (.*) "
115 r"(?P<result>PASSED|FAILED)",
116 'fixup': {"pass": "PASSED", "fail": "FAILED"},
117 'required': [
118 ("psa_protected_storage"
119 "_ns_interface_tests_tfm_sst_test_1xxx_"),
120 ("psa_internal_trusted_storage"
121 "_ns_interface_tests_tfm_its_test_1xxx_"),
122 ("auditlog_"
123 "non_secure_interface_test_tfm_audit_test_1xxx_"),
124 ("crypto_"
125 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
126 ("initial_attestation_service_"
127 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
128 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
129 ]
130 }
131 ] # Monitors
132 }, # Regression
133 'RegressionIPC': {
134 "binaries": {
135 "firmware": "tfm_sign.bin",
136 "bootloader": "mcuboot.bin"
137 },
138 "monitors": [
139 {
140 'name': 'Secure_Test_Suites_Summary',
141 'start': 'Secure test suites summary',
142 'end': 'End of Secure test suites',
143 'pattern': r"Test suite '(?P<"
144 r"test_case_id>[^\n]+)' has (.*) "
145 r"(?P<result>PASSED|FAILED)",
146 'fixup': {"pass": "PASSED", "fail": "FAILED"},
147 'required': [
148 ("psa_protected_storage_"
149 "s_interface_tests_tfm_sst_test_2xxx_"),
150 "sst_reliability_tests_tfm_sst_test_3xxx_",
151 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
152 ("psa_internal_trusted_storage_"
153 "s_interface_tests_tfm_its_test_2xxx_"),
154 "its_reliability_tests_tfm_its_test_3xxx_",
155 ("audit_"
156 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
157 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
158 ("initial_attestation_service_"
159 "secure_interface_tests_tfm_attest_test_1xxx_"),
160 ]
161 },
162 {
163 'name': 'Non_Secure_Test_Suites_Summary',
164 'start': 'Non-secure test suites summary',
165 'end': r'End of Non-secure test suites',
166 'pattern': r"Test suite '(?P<"
167 r"test_case_id>[^\n]+)' has (.*) "
168 r"(?P<result>PASSED|FAILED)",
169 'fixup': {"pass": "PASSED", "fail": "FAILED"},
170 'required': [
171 ("psa_protected_storage"
172 "_ns_interface_tests_tfm_sst_test_1xxx_"),
173 ("psa_internal_trusted_storage"
174 "_ns_interface_tests_tfm_its_test_1xxx_"),
175 ("auditlog_"
176 "non_secure_interface_test_tfm_audit_test_1xxx_"),
177 ("crypto_"
178 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
179 ("initial_attestation_service_"
180 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
181 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
182 ]
183 }
184 ] # Monitors
185 }, # Regression
186 'RegressionIPCTfmLevel2': {
187 "binaries": {
188 "firmware": "tfm_sign.bin",
189 "bootloader": "mcuboot.bin"
190 },
191 "monitors": [
192 {
193 'name': 'Secure_Test_Suites_Summary',
194 'start': 'Secure test suites summary',
195 'end': 'End of Secure test suites',
196 'pattern': r"Test suite '(?P<"
197 r"test_case_id>[^\n]+)' has (.*) "
198 r"(?P<result>PASSED|FAILED)",
199 'fixup': {"pass": "PASSED", "fail": "FAILED"},
200 'required': [
201 ("psa_protected_storage_"
202 "s_interface_tests_tfm_sst_test_2xxx_"),
203 "sst_reliability_tests_tfm_sst_test_3xxx_",
204 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
205 ("psa_internal_trusted_storage_"
206 "s_interface_tests_tfm_its_test_2xxx_"),
207 "its_reliability_tests_tfm_its_test_3xxx_",
208 ("audit_"
209 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
210 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
211 ("initial_attestation_service_"
212 "secure_interface_tests_tfm_attest_test_1xxx_"),
213 ]
214 },
215 {
216 'name': 'Non_Secure_Test_Suites_Summary',
217 'start': 'Non-secure test suites summary',
218 'end': r'End of Non-secure test suites',
219 'pattern': r"Test suite '(?P<"
220 r"test_case_id>[^\n]+)' has (.*) "
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100221 r"(?P<result>PASSED|FAILED)",
222 'fixup': {"pass": "PASSED", "fail": "FAILED"},
223 'required': [
Minos Galanakis8305a6e2019-04-04 15:55:40 +0100224 ("psa_protected_storage"
225 "_ns_interface_tests_tfm_sst_test_1xxx_"),
TudorCretu8b138472019-08-30 10:51:05 +0100226 ("psa_internal_trusted_storage"
227 "_ns_interface_tests_tfm_its_test_1xxx_"),
Minos Galanakis8305a6e2019-04-04 15:55:40 +0100228 ("auditlog_"
229 "non_secure_interface_test_tfm_audit_test_1xxx_"),
230 ("crypto_"
231 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
232 ("initial_attestation_service_"
Minos Galanakisf0dae4e2019-05-20 10:56:57 +0100233 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
Minos Galanakis8305a6e2019-04-04 15:55:40 +0100234 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
235 ]
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100236 }
237 ] # Monitors
238 }, # Regression
Minos Galanakisea421232019-06-20 17:11:28 +0100239 'CoreIPC': {
240 "binaries": {
241 "firmware": "tfm_sign.bin",
242 "bootloader": "mcuboot.bin"
243 },
244 "monitors": [
245 {
246 'name': 'Secure_Test_Suites_Summary',
Minos Galanakis8da148a2019-10-18 17:26:40 +0100247 'start': '[Sec Thread]',
Matthew Hartfb6fd362020-03-04 21:03:59 +0000248 'end': 'system starting',
Minos Galanakisea421232019-06-20 17:11:28 +0100249 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
250 r'(?P<test_case_id>Secure image '
251 r'initializing)(?P<result>!)',
252 'fixup': {"pass": "!", "fail": ""},
253 'required': ["secure_image_initializing"]
254 } # Monitors
255 ]
256 }, # CoreIPC
257 'CoreIPCTfmLevel2': {
258 "binaries": {
259 "firmware": "tfm_sign.bin",
260 "bootloader": "mcuboot.bin"
261 },
262 "monitors": [
263 {
264 'name': 'Secure_Test_Suites_Summary',
Minos Galanakis8da148a2019-10-18 17:26:40 +0100265 'start': '[Sec Thread]',
Minos Galanakisea421232019-06-20 17:11:28 +0100266 'end': '\\x1b\\\[0m',
267 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
268 r'(?P<test_case_id>Secure image '
269 r'initializing)(?P<result>!)',
270 'fixup': {"pass": "!", "fail": ""},
271 'required': ["secure_image_initializing"]
272 } # Monitors
273 ]
274 }, # CoreIPCTfmLevel2
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +0100275 } # Tests
276}
277
Dean Bircha6ede7e2020-03-13 14:00:33 +0000278
Matthew Hart2c2688f2020-05-26 13:09:20 +0100279fvp_mps2_an521_bl2 = {
280 "templ": "fvp_mps2.jinja2",
281 "job_name": "fvp_mps2_an521_bl2",
Dean Bircha6ede7e2020-03-13 14:00:33 +0000282 "device_type": "fvp",
Matthew Hart2c2688f2020-05-26 13:09:20 +0100283 "job_timeout": 15,
284 "action_timeout": 10,
285 "monitor_timeout": 10,
Matthew Hartfb6fd362020-03-04 21:03:59 +0000286 "poweroff_timeout": 1,
Dean Bircha6ede7e2020-03-13 14:00:33 +0000287 "recovery_store_url": "%(jenkins_url)s/"
288 "job/%(jenkins_job)s",
289 "artifact_store_url": "%(jenkins_url)s/"
290 "job/%(jenkins_job)s",
Matthew Hartfb6fd362020-03-04 21:03:59 +0000291 "platforms": {"AN521": "mps2_an521_v3.0.tar.gz"},
292 "compilers": ["GNUARM", "ARMCLANG"],
Matthew Hart2c2688f2020-05-26 13:09:20 +0100293 "build_types": ["Debug", "Release", "Minsizerel"],
Dean Bircha6ede7e2020-03-13 14:00:33 +0000294 "boot_types": ["BL2"],
Matthew Hartfb6fd362020-03-04 21:03:59 +0000295 "data_bin_offset": "0x10080000",
296 "tests": {
297 'Default': {
298 "binaries": {
299 "firmware": "mcuboot.axf",
300 "bootloader": "tfm_s_ns_signed.bin"
301 },
302 "monitors": [
303 {
304 'name': 'Secure_Test_Suites_Summary',
305 'start': r'[Sec Thread]',
306 'end': r'system starting',
307 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
308 r'(?P<test_case_id>Secure image '
309 r'initializing)(?P<result>!)',
310 'fixup': {"pass": "!", "fail": ""},
311 'required': ["secure_image_initializing"]
312 } # Monitors
313 ]
314 }, # Default
315 'Regression': {
316 "binaries": {
317 "firmware": "mcuboot.axf",
318 "bootloader": "tfm_s_ns_signed.bin"
319 },
320 "monitors": [
321 {
322 'name': 'Secure_Test_Suites_Summary',
323 'start': 'Secure test suites summary',
324 'end': 'End of Secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100325 'pattern': r"Test suite '(?P<"
326 r"test_case_id>[^\n]+)' has (.*) "
Matthew Hartfb6fd362020-03-04 21:03:59 +0000327 r"(?P<result>PASSED|FAILED)",
328 'fixup': {"pass": "PASSED", "fail": "FAILED"},
329 'required': [
330 ("psa_protected_storage_"
331 "s_interface_tests_tfm_sst_test_2xxx_"),
332 "sst_reliability_tests_tfm_sst_test_3xxx_",
333 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
334 ("psa_internal_trusted_storage_"
335 "s_interface_tests_tfm_its_test_2xxx_"),
336 "its_reliability_tests_tfm_its_test_3xxx_",
337 ("audit_"
338 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
339 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
340 ("initial_attestation_service_"
341 "secure_interface_tests_tfm_attest_test_1xxx_"),
342 ]
343 },
344 {
345 'name': 'Non_Secure_Test_Suites_Summary',
346 'start': 'Non-secure test suites summary',
347 'end': r'End of Non-secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100348 'pattern': r"Test suite '(?P<"
349 r"test_case_id>[^\n]+)' has (.*) "
350 r"(?P<result>PASSED|FAILED)",
351 'fixup': {"pass": "PASSED", "fail": "FAILED"},
352 'required': [
353 ("psa_protected_storage"
354 "_ns_interface_tests_tfm_sst_test_1xxx_"),
355 ("psa_internal_trusted_storage"
356 "_ns_interface_tests_tfm_its_test_1xxx_"),
357 ("auditlog_"
358 "non_secure_interface_test_tfm_audit_test_1xxx_"),
359 ("crypto_"
360 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
361 ("initial_attestation_service_"
362 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
363 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
364 ]
365 }
366 ] # Monitors
367 }, # Regression
368 'RegressionIPC': {
369 "binaries": {
370 "firmware": "mcuboot.axf",
371 "bootloader": "tfm_s_ns_signed.bin"
372 },
373 "monitors": [
374 {
375 'name': 'Secure_Test_Suites_Summary',
376 'start': 'Secure test suites summary',
377 'end': 'End of Secure test suites',
378 'pattern': r"Test suite '(?P<"
379 r"test_case_id>[^\n]+)' has (.*) "
380 r"(?P<result>PASSED|FAILED)",
381 'fixup': {"pass": "PASSED", "fail": "FAILED"},
382 'required': [
383 ("psa_protected_storage_"
384 "s_interface_tests_tfm_sst_test_2xxx_"),
385 "sst_reliability_tests_tfm_sst_test_3xxx_",
386 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
387 ("psa_internal_trusted_storage_"
388 "s_interface_tests_tfm_its_test_2xxx_"),
389 "its_reliability_tests_tfm_its_test_3xxx_",
390 ("audit_"
391 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
392 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
393 ("initial_attestation_service_"
394 "secure_interface_tests_tfm_attest_test_1xxx_"),
395 ]
396 },
397 {
398 'name': 'Non_Secure_Test_Suites_Summary',
399 'start': 'Non-secure test suites summary',
400 'end': r'End of Non-secure test suites',
401 'pattern': r"Test suite '(?P<"
402 r"test_case_id>[^\n]+)' has (.*) "
403 r"(?P<result>PASSED|FAILED)",
404 'fixup': {"pass": "PASSED", "fail": "FAILED"},
405 'required': [
406 ("psa_protected_storage"
407 "_ns_interface_tests_tfm_sst_test_1xxx_"),
408 ("psa_internal_trusted_storage"
409 "_ns_interface_tests_tfm_its_test_1xxx_"),
410 ("auditlog_"
411 "non_secure_interface_test_tfm_audit_test_1xxx_"),
412 ("crypto_"
413 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
414 ("initial_attestation_service_"
415 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
416 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
417 ]
418 }
419 ] # Monitors
420 }, # Regression
421 'RegressionIPCTfmLevel2': {
422 "binaries": {
423 "firmware": "mcuboot.axf",
424 "bootloader": "tfm_s_ns_signed.bin"
425 },
426 "monitors": [
427 {
428 'name': 'Secure_Test_Suites_Summary',
429 'start': 'Secure test suites summary',
430 'end': 'End of Secure test suites',
431 'pattern': r"Test suite '(?P<"
432 r"test_case_id>[^\n]+)' has (.*) "
433 r"(?P<result>PASSED|FAILED)",
434 'fixup': {"pass": "PASSED", "fail": "FAILED"},
435 'required': [
436 ("psa_protected_storage_"
437 "s_interface_tests_tfm_sst_test_2xxx_"),
438 "sst_reliability_tests_tfm_sst_test_3xxx_",
439 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
440 ("psa_internal_trusted_storage_"
441 "s_interface_tests_tfm_its_test_2xxx_"),
442 "its_reliability_tests_tfm_its_test_3xxx_",
443 ("audit_"
444 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
445 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
446 ("initial_attestation_service_"
447 "secure_interface_tests_tfm_attest_test_1xxx_"),
448 ]
449 },
450 {
451 'name': 'Non_Secure_Test_Suites_Summary',
452 'start': 'Non-secure test suites summary',
453 'end': r'End of Non-secure test suites',
454 'pattern': r"Test suite '(?P<"
455 r"test_case_id>[^\n]+)' has (.*) "
Matthew Hartfb6fd362020-03-04 21:03:59 +0000456 r"(?P<result>PASSED|FAILED)",
457 'fixup': {"pass": "PASSED", "fail": "FAILED"},
458 'required': [
459 ("psa_protected_storage"
460 "_ns_interface_tests_tfm_sst_test_1xxx_"),
461 ("psa_internal_trusted_storage"
462 "_ns_interface_tests_tfm_its_test_1xxx_"),
463 ("auditlog_"
464 "non_secure_interface_test_tfm_audit_test_1xxx_"),
465 ("crypto_"
466 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
467 ("initial_attestation_service_"
468 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
469 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
470 ]
471 }
472 ] # Monitors
473 }, # Regression
474 'CoreIPC': {
475 "binaries": {
476 "firmware": "mcuboot.axf",
477 "bootloader": "tfm_s_ns_signed.bin"
478 },
479 "monitors": [
480 {
481 'name': 'Secure_Test_Suites_Summary',
482 'start': r'[Sec Thread]',
483 'end': r'system starting',
484 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
485 r'(?P<test_case_id>Secure image '
486 r'initializing)(?P<result>!)',
487 'fixup': {"pass": "!", "fail": ""},
488 'required': ["secure_image_initializing"]
489 } # Monitors
490 ]
491 }, # CoreIPC
492 'CoreIPCTfmLevel2': {
493 "binaries": {
494 "firmware": "mcuboot.axf",
495 "bootloader": "tfm_s_ns_signed.bin"
496 },
497 "monitors": [
498 {
499 'name': 'Secure_Test_Suites_Summary',
500 'start': r'[Sec Thread]',
501 'end': r'system starting',
502 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
503 r'(?P<test_case_id>Secure image '
504 r'initializing)(?P<result>!)',
505 'fixup': {"pass": "!", "fail": ""},
506 'required': ["secure_image_initializing"]
507 } # Monitors
508 ]
509 }, # CoreIPCTfmLevel2
510 } # Tests
511}
512
513
Matthew Hart2c2688f2020-05-26 13:09:20 +0100514fvp_mps2_an521_nobl2 = {
515 "templ": "fvp_mps2.jinja2",
516 "job_name": "fvp_mps2_an521_nobl2",
Matthew Hartfb6fd362020-03-04 21:03:59 +0000517 "device_type": "fvp",
Matthew Hart2c2688f2020-05-26 13:09:20 +0100518 "job_timeout": 15,
519 "action_timeout": 10,
520 "monitor_timeout": 10,
Matthew Hartfb6fd362020-03-04 21:03:59 +0000521 "poweroff_timeout": 1,
522 "recovery_store_url": "%(jenkins_url)s/"
523 "job/%(jenkins_job)s",
524 "artifact_store_url": "%(jenkins_url)s/"
525 "job/%(jenkins_job)s",
526 "platforms": {"AN521": "mps2_an521_v3.0.tar.gz"},
527 "compilers": ["GNUARM", "ARMCLANG"],
Matthew Hart2c2688f2020-05-26 13:09:20 +0100528 "build_types": ["Debug", "Release", "Minsizerel"],
Matthew Hartfb6fd362020-03-04 21:03:59 +0000529 "boot_types": ["NOBL2"],
530 "data_bin_offset": "0x00100000",
Dean Bircha6ede7e2020-03-13 14:00:33 +0000531 "tests": {
532 'Default': {
533 "binaries": {
534 "firmware": "tfm_s.axf",
535 "bootloader": "tfm_ns.bin"
536 },
537 "monitors": [
538 {
539 'name': 'Secure_Test_Suites_Summary',
Matthew Hartfb6fd362020-03-04 21:03:59 +0000540 'start': r'[Sec Thread]',
541 'end': r'system starting',
Dean Bircha6ede7e2020-03-13 14:00:33 +0000542 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
543 r'(?P<test_case_id>Secure image '
544 r'initializing)(?P<result>!)',
545 'fixup': {"pass": "!", "fail": ""},
546 'required': ["secure_image_initializing"]
Matthew Hartfb6fd362020-03-04 21:03:59 +0000547 }
Dean Bircha6ede7e2020-03-13 14:00:33 +0000548 ]
549 }, # Default
550 'Regression': {
551 "binaries": {
552 "firmware": "tfm_s.axf",
553 "bootloader": "tfm_ns.bin"
554 },
555 "monitors": [
556 {
557 'name': 'Secure_Test_Suites_Summary',
558 'start': 'Secure test suites summary',
559 'end': 'End of Secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100560 'pattern': r"Test suite '(?P<"
561 r"test_case_id>[^\n]+)' has (.*) "
Dean Bircha6ede7e2020-03-13 14:00:33 +0000562 r"(?P<result>PASSED|FAILED)",
563 'fixup': {"pass": "PASSED", "fail": "FAILED"},
564 'required': [
565 ("psa_protected_storage_"
566 "s_interface_tests_tfm_sst_test_2xxx_"),
567 "sst_reliability_tests_tfm_sst_test_3xxx_",
568 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
569 ("psa_internal_trusted_storage_"
570 "s_interface_tests_tfm_its_test_2xxx_"),
571 "its_reliability_tests_tfm_its_test_3xxx_",
572 ("audit_"
573 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
574 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
575 ("initial_attestation_service_"
576 "secure_interface_tests_tfm_attest_test_1xxx_"),
577 ]
578 },
579 {
580 'name': 'Non_Secure_Test_Suites_Summary',
581 'start': 'Non-secure test suites summary',
582 'end': r'End of Non-secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100583 'pattern': r"Test suite '(?P<"
584 r"test_case_id>[^\n]+)' has (.*) "
Dean Bircha6ede7e2020-03-13 14:00:33 +0000585 r"(?P<result>PASSED|FAILED)",
586 'fixup': {"pass": "PASSED", "fail": "FAILED"},
587 'required': [
588 ("psa_protected_storage"
589 "_ns_interface_tests_tfm_sst_test_1xxx_"),
590 ("psa_internal_trusted_storage"
591 "_ns_interface_tests_tfm_its_test_1xxx_"),
592 ("auditlog_"
593 "non_secure_interface_test_tfm_audit_test_1xxx_"),
594 ("crypto_"
595 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
596 ("initial_attestation_service_"
597 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
598 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
599 ]
600 }
601 ] # Monitors
602 }, # Regression
Matthew Hart2c2688f2020-05-26 13:09:20 +0100603 'RegressionIPC': {
604 "binaries": {
605 "firmware": "tfm_s.axf",
606 "bootloader": "tfm_ns.bin"
607 },
608 "monitors": [
609 {
610 'name': 'Secure_Test_Suites_Summary',
611 'start': 'Secure test suites summary',
612 'end': 'End of Secure test suites',
613 'pattern': r"Test suite '(?P<"
614 r"test_case_id>[^\n]+)' has (.*) "
615 r"(?P<result>PASSED|FAILED)",
616 'fixup': {"pass": "PASSED", "fail": "FAILED"},
617 'required': [
618 ("psa_protected_storage_"
619 "s_interface_tests_tfm_sst_test_2xxx_"),
620 "sst_reliability_tests_tfm_sst_test_3xxx_",
621 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
622 ("psa_internal_trusted_storage_"
623 "s_interface_tests_tfm_its_test_2xxx_"),
624 "its_reliability_tests_tfm_its_test_3xxx_",
625 ("audit_"
626 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
627 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
628 ("initial_attestation_service_"
629 "secure_interface_tests_tfm_attest_test_1xxx_"),
630 ]
631 },
632 {
633 'name': 'Non_Secure_Test_Suites_Summary',
634 'start': 'Non-secure test suites summary',
635 'end': r'End of Non-secure test suites',
636 'pattern': r"Test suite '(?P<"
637 r"test_case_id>[^\n]+)' has (.*) "
638 r"(?P<result>PASSED|FAILED)",
639 'fixup': {"pass": "PASSED", "fail": "FAILED"},
640 'required': [
641 ("psa_protected_storage"
642 "_ns_interface_tests_tfm_sst_test_1xxx_"),
643 ("psa_internal_trusted_storage"
644 "_ns_interface_tests_tfm_its_test_1xxx_"),
645 ("auditlog_"
646 "non_secure_interface_test_tfm_audit_test_1xxx_"),
647 ("crypto_"
648 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
649 ("initial_attestation_service_"
650 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
651 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
652 ]
653 }
654 ] # Monitors
655 }, # RegressionIPC
656 'RegressionIPCTfmLevel2': {
657 "binaries": {
658 "firmware": "tfm_s.axf",
659 "bootloader": "tfm_ns.bin"
660 },
661 "monitors": [
662 {
663 'name': 'Secure_Test_Suites_Summary',
664 'start': 'Secure test suites summary',
665 'end': 'End of Secure test suites',
666 'pattern': r"Test suite '(?P<"
667 r"test_case_id>[^\n]+)' has (.*) "
668 r"(?P<result>PASSED|FAILED)",
669 'fixup': {"pass": "PASSED", "fail": "FAILED"},
670 'required': [
671 ("psa_protected_storage_"
672 "s_interface_tests_tfm_sst_test_2xxx_"),
673 "sst_reliability_tests_tfm_sst_test_3xxx_",
674 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
675 ("psa_internal_trusted_storage_"
676 "s_interface_tests_tfm_its_test_2xxx_"),
677 "its_reliability_tests_tfm_its_test_3xxx_",
678 ("audit_"
679 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
680 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
681 ("initial_attestation_service_"
682 "secure_interface_tests_tfm_attest_test_1xxx_"),
683 ]
684 },
685 {
686 'name': 'Non_Secure_Test_Suites_Summary',
687 'start': 'Non-secure test suites summary',
688 'end': r'End of Non-secure test suites',
689 'pattern': r"Test suite '(?P<"
690 r"test_case_id>[^\n]+)' has (.*) "
691 r"(?P<result>PASSED|FAILED)",
692 'fixup': {"pass": "PASSED", "fail": "FAILED"},
693 'required': [
694 ("psa_protected_storage"
695 "_ns_interface_tests_tfm_sst_test_1xxx_"),
696 ("psa_internal_trusted_storage"
697 "_ns_interface_tests_tfm_its_test_1xxx_"),
698 ("auditlog_"
699 "non_secure_interface_test_tfm_audit_test_1xxx_"),
700 ("crypto_"
701 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
702 ("initial_attestation_service_"
703 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
704 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
705 ]
706 }
707 ] # Monitors
708 }, # RegressionIPCTfmLevel2
Dean Bircha6ede7e2020-03-13 14:00:33 +0000709 'CoreIPC': {
710 "binaries": {
711 "firmware": "tfm_s.axf",
712 "bootloader": "tfm_ns.bin"
713 },
714 "monitors": [
715 {
716 'name': 'Secure_Test_Suites_Summary',
Matthew Hartfb6fd362020-03-04 21:03:59 +0000717 'start': r'[Sec Thread]',
718 'end': r'system starting',
Dean Bircha6ede7e2020-03-13 14:00:33 +0000719 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
720 r'(?P<test_case_id>Secure image '
721 r'initializing)(?P<result>!)',
722 'fixup': {"pass": "!", "fail": ""},
723 'required': ["secure_image_initializing"]
724 } # Monitors
725 ]
726 }, # CoreIPC
727 'CoreIPCTfmLevel2': {
728 "binaries": {
729 "firmware": "tfm_s.axf",
730 "bootloader": "tfm_ns.bin"
731 },
732 "monitors": [
733 {
734 'name': 'Secure_Test_Suites_Summary',
Matthew Hartfb6fd362020-03-04 21:03:59 +0000735 'start': r'[Sec Thread]',
736 'end': r'system starting',
Dean Bircha6ede7e2020-03-13 14:00:33 +0000737 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
738 r'(?P<test_case_id>Secure image '
739 r'initializing)(?P<result>!)',
740 'fixup': {"pass": "!", "fail": ""},
741 'required': ["secure_image_initializing"]
742 } # Monitors
743 ]
744 }, # CoreIPCTfmLevel2
745 } # Tests
746}
747
Matthew Hart2c2688f2020-05-26 13:09:20 +0100748
749fvp_mps2_an519_bl2 = {
750 "templ": "fvp_mps2.jinja2",
751 "job_name": "fvp_mps2_an519_bl2",
752 "device_type": "fvp",
753 "job_timeout": 15,
754 "action_timeout": 10,
755 "monitor_timeout": 10,
756 "poweroff_timeout": 1,
757 "platforms": {"AN519": ""},
758 "compilers": ["GNUARM", "ARMCLANG"],
759 "build_types": ["Debug", "Release", "Minsizerel"],
760 "boot_types": ["BL2"],
761 "data_bin_offset": "0x10080000",
762 "cpu0_baseline": 1,
763 "tests": {
764 'Default': {
765 "binaries": {
766 "firmware": "mcuboot.axf",
767 "bootloader": "tfm_s_ns_signed.bin"
768 },
769 "monitors": [
770 {
771 'name': 'Secure_Test_Suites_Summary',
772 'start': r'[Sec Thread]',
773 'end': r'system starting',
774 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
775 r'(?P<test_case_id>Secure image '
776 r'initializing)(?P<result>!)',
777 'fixup': {"pass": "!", "fail": ""},
778 'required': ["secure_image_initializing"]
779 } # Monitors
780 ]
781 }, # Default
782 'Regression': {
783 "binaries": {
784 "firmware": "mcuboot.axf",
785 "bootloader": "tfm_s_ns_signed.bin"
786 },
787 "monitors": [
788 {
789 'name': 'Secure_Test_Suites_Summary',
790 'start': 'Secure test suites summary',
791 'end': 'End of Secure test suites',
792 'pattern': r"Test suite '(?P<"
793 r"test_case_id>[^\n]+)' has (.*) "
794 r"(?P<result>PASSED|FAILED)",
795 'fixup': {"pass": "PASSED", "fail": "FAILED"},
796 'required': [
797 ("psa_protected_storage_"
798 "s_interface_tests_tfm_sst_test_2xxx_"),
799 "sst_reliability_tests_tfm_sst_test_3xxx_",
800 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
801 ("psa_internal_trusted_storage_"
802 "s_interface_tests_tfm_its_test_2xxx_"),
803 "its_reliability_tests_tfm_its_test_3xxx_",
804 ("audit_"
805 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
806 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
807 ("initial_attestation_service_"
808 "secure_interface_tests_tfm_attest_test_1xxx_"),
809 ]
810 },
811 {
812 'name': 'Non_Secure_Test_Suites_Summary',
813 'start': 'Non-secure test suites summary',
814 'end': r'End of Non-secure test suites',
815 'pattern': r"Test suite '(?P<"
816 r"test_case_id>[^\n]+)' has (.*) "
817 r"(?P<result>PASSED|FAILED)",
818 'fixup': {"pass": "PASSED", "fail": "FAILED"},
819 'required': [
820 ("psa_protected_storage"
821 "_ns_interface_tests_tfm_sst_test_1xxx_"),
822 ("psa_internal_trusted_storage"
823 "_ns_interface_tests_tfm_its_test_1xxx_"),
824 ("auditlog_"
825 "non_secure_interface_test_tfm_audit_test_1xxx_"),
826 ("crypto_"
827 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
828 ("initial_attestation_service_"
829 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
830 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
831 ]
832 }
833 ] # Monitors
834 }, # Regression
835 'RegressionIPC': {
836 "binaries": {
837 "firmware": "mcuboot.axf",
838 "bootloader": "tfm_s_ns_signed.bin"
839 },
840 "monitors": [
841 {
842 'name': 'Secure_Test_Suites_Summary',
843 'start': 'Secure test suites summary',
844 'end': 'End of Secure test suites',
845 'pattern': r"Test suite '(?P<"
846 r"test_case_id>[^\n]+)' has (.*) "
847 r"(?P<result>PASSED|FAILED)",
848 'fixup': {"pass": "PASSED", "fail": "FAILED"},
849 'required': [
850 ("psa_protected_storage_"
851 "s_interface_tests_tfm_sst_test_2xxx_"),
852 "sst_reliability_tests_tfm_sst_test_3xxx_",
853 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
854 ("psa_internal_trusted_storage_"
855 "s_interface_tests_tfm_its_test_2xxx_"),
856 "its_reliability_tests_tfm_its_test_3xxx_",
857 ("audit_"
858 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
859 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
860 ("initial_attestation_service_"
861 "secure_interface_tests_tfm_attest_test_1xxx_"),
862 ]
863 },
864 {
865 'name': 'Non_Secure_Test_Suites_Summary',
866 'start': 'Non-secure test suites summary',
867 'end': r'End of Non-secure test suites',
868 'pattern': r"Test suite '(?P<"
869 r"test_case_id>[^\n]+)' has (.*) "
870 r"(?P<result>PASSED|FAILED)",
871 'fixup': {"pass": "PASSED", "fail": "FAILED"},
872 'required': [
873 ("psa_protected_storage"
874 "_ns_interface_tests_tfm_sst_test_1xxx_"),
875 ("psa_internal_trusted_storage"
876 "_ns_interface_tests_tfm_its_test_1xxx_"),
877 ("auditlog_"
878 "non_secure_interface_test_tfm_audit_test_1xxx_"),
879 ("crypto_"
880 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
881 ("initial_attestation_service_"
882 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
883 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
884 ]
885 }
886 ] # Monitors
887 }, # Regression
888 'RegressionIPCTfmLevel2': {
889 "binaries": {
890 "firmware": "mcuboot.axf",
891 "bootloader": "tfm_s_ns_signed.bin"
892 },
893 "monitors": [
894 {
895 'name': 'Secure_Test_Suites_Summary',
896 'start': 'Secure test suites summary',
897 'end': 'End of Secure test suites',
898 'pattern': r"Test suite '(?P<"
899 r"test_case_id>[^\n]+)' has (.*) "
900 r"(?P<result>PASSED|FAILED)",
901 'fixup': {"pass": "PASSED", "fail": "FAILED"},
902 'required': [
903 ("psa_protected_storage_"
904 "s_interface_tests_tfm_sst_test_2xxx_"),
905 "sst_reliability_tests_tfm_sst_test_3xxx_",
906 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
907 ("psa_internal_trusted_storage_"
908 "s_interface_tests_tfm_its_test_2xxx_"),
909 "its_reliability_tests_tfm_its_test_3xxx_",
910 ("audit_"
911 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
912 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
913 ("initial_attestation_service_"
914 "secure_interface_tests_tfm_attest_test_1xxx_"),
915 ]
916 },
917 {
918 'name': 'Non_Secure_Test_Suites_Summary',
919 'start': 'Non-secure test suites summary',
920 'end': r'End of Non-secure test suites',
921 'pattern': r"Test suite '(?P<"
922 r"test_case_id>[^\n]+)' has (.*) "
923 r"(?P<result>PASSED|FAILED)",
924 'fixup': {"pass": "PASSED", "fail": "FAILED"},
925 'required': [
926 ("psa_protected_storage"
927 "_ns_interface_tests_tfm_sst_test_1xxx_"),
928 ("psa_internal_trusted_storage"
929 "_ns_interface_tests_tfm_its_test_1xxx_"),
930 ("auditlog_"
931 "non_secure_interface_test_tfm_audit_test_1xxx_"),
932 ("crypto_"
933 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
934 ("initial_attestation_service_"
935 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
936 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
937 ]
938 }
939 ] # Monitors
940 }, # Regression
941 'CoreIPC': {
942 "binaries": {
943 "firmware": "mcuboot.axf",
944 "bootloader": "tfm_s_ns_signed.bin"
945 },
946 "monitors": [
947 {
948 'name': 'Secure_Test_Suites_Summary',
949 'start': r'[Sec Thread]',
950 'end': r'system starting',
951 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
952 r'(?P<test_case_id>Secure image '
953 r'initializing)(?P<result>!)',
954 'fixup': {"pass": "!", "fail": ""},
955 'required': ["secure_image_initializing"]
956 } # Monitors
957 ]
958 }, # CoreIPC
959 'CoreIPCTfmLevel2': {
960 "binaries": {
961 "firmware": "mcuboot.axf",
962 "bootloader": "tfm_s_ns_signed.bin"
963 },
964 "monitors": [
965 {
966 'name': 'Secure_Test_Suites_Summary',
967 'start': r'[Sec Thread]',
968 'end': r'system starting',
969 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
970 r'(?P<test_case_id>Secure image '
971 r'initializing)(?P<result>!)',
972 'fixup': {"pass": "!", "fail": ""},
973 'required': ["secure_image_initializing"]
974 } # Monitors
975 ]
976 }, # CoreIPCTfmLevel2
977 } # Tests
978}
979
980
981fvp_mps2_an519_nobl2 = {
982 "templ": "fvp_mps2.jinja2",
983 "job_name": "fvp_mps2_an519_nobl2",
984 "device_type": "fvp",
985 "job_timeout": 15,
986 "action_timeout": 10,
987 "monitor_timeout": 10,
988 "poweroff_timeout": 1,
989 "platforms": {"AN519": ""},
990 "compilers": ["GNUARM", "ARMCLANG"],
991 "build_types": ["Debug", "Release", "Minsizerel"],
992 "boot_types": ["NOBL2"],
993 "data_bin_offset": "0x00100000",
994 "cpu0_baseline": 1,
995 "tests": {
996 'Default': {
997 "binaries": {
998 "firmware": "tfm_s.axf",
999 "bootloader": "tfm_ns.bin"
1000 },
1001 "monitors": [
1002 {
1003 'name': 'Secure_Test_Suites_Summary',
1004 'start': r'[Sec Thread]',
1005 'end': r'system starting',
1006 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
1007 r'(?P<test_case_id>Secure image '
1008 r'initializing)(?P<result>!)',
1009 'fixup': {"pass": "!", "fail": ""},
1010 'required': ["secure_image_initializing"]
1011 }
1012 ]
1013 }, # Default
1014 'Regression': {
1015 "binaries": {
1016 "firmware": "tfm_s.axf",
1017 "bootloader": "tfm_ns.bin"
1018 },
1019 "monitors": [
1020 {
1021 'name': 'Secure_Test_Suites_Summary',
1022 'start': 'Secure test suites summary',
1023 'end': 'End of Secure test suites',
1024 'pattern': r"Test suite '(?P<"
1025 r"test_case_id>[^\n]+)' has (.*) "
1026 r"(?P<result>PASSED|FAILED)",
1027 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1028 'required': [
1029 ("psa_protected_storage_"
1030 "s_interface_tests_tfm_sst_test_2xxx_"),
1031 "sst_reliability_tests_tfm_sst_test_3xxx_",
1032 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
1033 ("psa_internal_trusted_storage_"
1034 "s_interface_tests_tfm_its_test_2xxx_"),
1035 "its_reliability_tests_tfm_its_test_3xxx_",
1036 ("audit_"
1037 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
1038 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
1039 ("initial_attestation_service_"
1040 "secure_interface_tests_tfm_attest_test_1xxx_"),
1041 ]
1042 },
1043 {
1044 'name': 'Non_Secure_Test_Suites_Summary',
1045 'start': 'Non-secure test suites summary',
1046 'end': r'End of Non-secure test suites',
1047 'pattern': r"Test suite '(?P<"
1048 r"test_case_id>[^\n]+)' has (.*) "
1049 r"(?P<result>PASSED|FAILED)",
1050 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1051 'required': [
1052 ("psa_protected_storage"
1053 "_ns_interface_tests_tfm_sst_test_1xxx_"),
1054 ("psa_internal_trusted_storage"
1055 "_ns_interface_tests_tfm_its_test_1xxx_"),
1056 ("auditlog_"
1057 "non_secure_interface_test_tfm_audit_test_1xxx_"),
1058 ("crypto_"
1059 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
1060 ("initial_attestation_service_"
1061 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
1062 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
1063 ]
1064 }
1065 ] # Monitors
1066 }, # Regression
1067 'RegressionIPC': {
1068 "binaries": {
1069 "firmware": "tfm_s.axf",
1070 "bootloader": "tfm_ns.bin"
1071 },
1072 "monitors": [
1073 {
1074 'name': 'Secure_Test_Suites_Summary',
1075 'start': 'Secure test suites summary',
1076 'end': 'End of Secure test suites',
1077 'pattern': r"Test suite '(?P<"
1078 r"test_case_id>[^\n]+)' has (.*) "
1079 r"(?P<result>PASSED|FAILED)",
1080 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1081 'required': [
1082 ("psa_protected_storage_"
1083 "s_interface_tests_tfm_sst_test_2xxx_"),
1084 "sst_reliability_tests_tfm_sst_test_3xxx_",
1085 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
1086 ("psa_internal_trusted_storage_"
1087 "s_interface_tests_tfm_its_test_2xxx_"),
1088 "its_reliability_tests_tfm_its_test_3xxx_",
1089 ("audit_"
1090 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
1091 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
1092 ("initial_attestation_service_"
1093 "secure_interface_tests_tfm_attest_test_1xxx_"),
1094 ]
1095 },
1096 {
1097 'name': 'Non_Secure_Test_Suites_Summary',
1098 'start': 'Non-secure test suites summary',
1099 'end': r'End of Non-secure test suites',
1100 'pattern': r"Test suite '(?P<"
1101 r"test_case_id>[^\n]+)' has (.*) "
1102 r"(?P<result>PASSED|FAILED)",
1103 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1104 'required': [
1105 ("psa_protected_storage"
1106 "_ns_interface_tests_tfm_sst_test_1xxx_"),
1107 ("psa_internal_trusted_storage"
1108 "_ns_interface_tests_tfm_its_test_1xxx_"),
1109 ("auditlog_"
1110 "non_secure_interface_test_tfm_audit_test_1xxx_"),
1111 ("crypto_"
1112 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
1113 ("initial_attestation_service_"
1114 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
1115 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
1116 ]
1117 }
1118 ] # Monitors
1119 }, # RegressionIPC
1120 'RegressionIPCTfmLevel2': {
1121 "binaries": {
1122 "firmware": "tfm_s.axf",
1123 "bootloader": "tfm_ns.bin"
1124 },
1125 "monitors": [
1126 {
1127 'name': 'Secure_Test_Suites_Summary',
1128 'start': 'Secure test suites summary',
1129 'end': 'End of Secure test suites',
1130 'pattern': r"Test suite '(?P<"
1131 r"test_case_id>[^\n]+)' has (.*) "
1132 r"(?P<result>PASSED|FAILED)",
1133 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1134 'required': [
1135 ("psa_protected_storage_"
1136 "s_interface_tests_tfm_sst_test_2xxx_"),
1137 "sst_reliability_tests_tfm_sst_test_3xxx_",
1138 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
1139 ("psa_internal_trusted_storage_"
1140 "s_interface_tests_tfm_its_test_2xxx_"),
1141 "its_reliability_tests_tfm_its_test_3xxx_",
1142 ("audit_"
1143 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
1144 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
1145 ("initial_attestation_service_"
1146 "secure_interface_tests_tfm_attest_test_1xxx_"),
1147 ]
1148 },
1149 {
1150 'name': 'Non_Secure_Test_Suites_Summary',
1151 'start': 'Non-secure test suites summary',
1152 'end': r'End of Non-secure test suites',
1153 'pattern': r"Test suite '(?P<"
1154 r"test_case_id>[^\n]+)' has (.*) "
1155 r"(?P<result>PASSED|FAILED)",
1156 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1157 'required': [
1158 ("psa_protected_storage"
1159 "_ns_interface_tests_tfm_sst_test_1xxx_"),
1160 ("psa_internal_trusted_storage"
1161 "_ns_interface_tests_tfm_its_test_1xxx_"),
1162 ("auditlog_"
1163 "non_secure_interface_test_tfm_audit_test_1xxx_"),
1164 ("crypto_"
1165 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
1166 ("initial_attestation_service_"
1167 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
1168 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
1169 ]
1170 }
1171 ] # Monitors
1172 }, # RegressionIPCTfmLevel2
1173 'CoreIPC': {
1174 "binaries": {
1175 "firmware": "tfm_s.axf",
1176 "bootloader": "tfm_ns.bin"
1177 },
1178 "monitors": [
1179 {
1180 'name': 'Secure_Test_Suites_Summary',
1181 'start': r'[Sec Thread]',
1182 'end': r'system starting',
1183 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
1184 r'(?P<test_case_id>Secure image '
1185 r'initializing)(?P<result>!)',
1186 'fixup': {"pass": "!", "fail": ""},
1187 'required': ["secure_image_initializing"]
1188 } # Monitors
1189 ]
1190 }, # CoreIPC
1191 'CoreIPCTfmLevel2': {
1192 "binaries": {
1193 "firmware": "tfm_s.axf",
1194 "bootloader": "tfm_ns.bin"
1195 },
1196 "monitors": [
1197 {
1198 'name': 'Secure_Test_Suites_Summary',
1199 'start': r'[Sec Thread]',
1200 'end': r'system starting',
1201 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
1202 r'(?P<test_case_id>Secure image '
1203 r'initializing)(?P<result>!)',
1204 'fixup': {"pass": "!", "fail": ""},
1205 'required': ["secure_image_initializing"]
1206 } # Monitors
1207 ]
1208 }, # CoreIPCTfmLevel2
1209 } # Tests
1210}
1211
1212
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001213# All configurations should be mapped here
Matthew Hart2c2688f2020-05-26 13:09:20 +01001214lava_gen_config_map = {"mps2_an521_bl2": tfm_mps2_sse_200,
1215 "fvp_mps2_an521_bl2": fvp_mps2_an521_bl2,
1216 "fvp_mps2_an521_nobl2": fvp_mps2_an521_nobl2,
1217 "fvp_mps2_an519_bl2": fvp_mps2_an519_bl2,
1218 "fvp_mps2_an519_nobl2": fvp_mps2_an519_nobl2}
1219
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001220lavagen_config_sort_order = [
1221 "templ",
1222 "job_name",
1223 "device_type",
1224 "job_timeout",
1225 "action_timeout",
1226 "monitor_timeout",
1227 "recovery_store_url",
1228 "artifact_store_url",
1229 "platforms",
1230 "compilers",
1231 "build_types",
1232 "boot_types",
1233 "tests"
1234]
1235
1236lava_gen_monitor_sort_order = [
1237 'name',
1238 'start',
1239 'end',
1240 'pattern',
1241 'fixup',
1242]
1243
1244if __name__ == "__main__":
1245 import os
1246 import sys
1247 from lava_helper import sort_lavagen_config
1248 try:
1249 from tfm_ci_pylib.utils import export_config_map
1250 except ImportError:
1251 dir_path = os.path.dirname(os.path.realpath(__file__))
1252 sys.path.append(os.path.join(dir_path, "../"))
1253 from tfm_ci_pylib.utils import export_config_map
1254
1255 if len(sys.argv) == 2:
1256 if sys.argv[1] == "--export":
1257 export_config_map(lava_gen_config_map)
1258 if len(sys.argv) == 3:
1259 if sys.argv[1] == "--export":
1260 export_config_map(sort_lavagen_config(lava_gen_config_map),
1261 sys.argv[2])