blob: 50ae0f1764e2995c41857ab7263949a2e0a3cc90 [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 Birch1d545c02020-05-29 14:09:21 +0100287 "platforms": {"AN521": ""},
Matthew Hartfb6fd362020-03-04 21:03:59 +0000288 "compilers": ["GNUARM", "ARMCLANG"],
Matthew Hart2c2688f2020-05-26 13:09:20 +0100289 "build_types": ["Debug", "Release", "Minsizerel"],
Dean Bircha6ede7e2020-03-13 14:00:33 +0000290 "boot_types": ["BL2"],
Matthew Hartfb6fd362020-03-04 21:03:59 +0000291 "data_bin_offset": "0x10080000",
292 "tests": {
293 'Default': {
294 "binaries": {
295 "firmware": "mcuboot.axf",
296 "bootloader": "tfm_s_ns_signed.bin"
297 },
298 "monitors": [
299 {
300 'name': 'Secure_Test_Suites_Summary',
301 'start': r'[Sec Thread]',
302 'end': r'system starting',
303 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
304 r'(?P<test_case_id>Secure image '
305 r'initializing)(?P<result>!)',
306 'fixup': {"pass": "!", "fail": ""},
307 'required': ["secure_image_initializing"]
308 } # Monitors
309 ]
310 }, # Default
311 'Regression': {
312 "binaries": {
313 "firmware": "mcuboot.axf",
314 "bootloader": "tfm_s_ns_signed.bin"
315 },
316 "monitors": [
317 {
318 'name': 'Secure_Test_Suites_Summary',
319 'start': 'Secure test suites summary',
320 'end': 'End of Secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100321 'pattern': r"Test suite '(?P<"
322 r"test_case_id>[^\n]+)' has (.*) "
Matthew Hartfb6fd362020-03-04 21:03:59 +0000323 r"(?P<result>PASSED|FAILED)",
324 'fixup': {"pass": "PASSED", "fail": "FAILED"},
325 'required': [
326 ("psa_protected_storage_"
327 "s_interface_tests_tfm_sst_test_2xxx_"),
328 "sst_reliability_tests_tfm_sst_test_3xxx_",
329 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
330 ("psa_internal_trusted_storage_"
331 "s_interface_tests_tfm_its_test_2xxx_"),
332 "its_reliability_tests_tfm_its_test_3xxx_",
333 ("audit_"
334 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
335 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
336 ("initial_attestation_service_"
337 "secure_interface_tests_tfm_attest_test_1xxx_"),
338 ]
339 },
340 {
341 'name': 'Non_Secure_Test_Suites_Summary',
342 'start': 'Non-secure test suites summary',
343 'end': r'End of Non-secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100344 'pattern': r"Test suite '(?P<"
345 r"test_case_id>[^\n]+)' has (.*) "
346 r"(?P<result>PASSED|FAILED)",
347 'fixup': {"pass": "PASSED", "fail": "FAILED"},
348 'required': [
349 ("psa_protected_storage"
350 "_ns_interface_tests_tfm_sst_test_1xxx_"),
351 ("psa_internal_trusted_storage"
352 "_ns_interface_tests_tfm_its_test_1xxx_"),
353 ("auditlog_"
354 "non_secure_interface_test_tfm_audit_test_1xxx_"),
355 ("crypto_"
356 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
357 ("initial_attestation_service_"
358 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
359 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
360 ]
361 }
362 ] # Monitors
363 }, # Regression
364 'RegressionIPC': {
365 "binaries": {
366 "firmware": "mcuboot.axf",
367 "bootloader": "tfm_s_ns_signed.bin"
368 },
369 "monitors": [
370 {
371 'name': 'Secure_Test_Suites_Summary',
372 'start': 'Secure test suites summary',
373 'end': 'End of Secure test suites',
374 'pattern': r"Test suite '(?P<"
375 r"test_case_id>[^\n]+)' has (.*) "
376 r"(?P<result>PASSED|FAILED)",
377 'fixup': {"pass": "PASSED", "fail": "FAILED"},
378 'required': [
379 ("psa_protected_storage_"
380 "s_interface_tests_tfm_sst_test_2xxx_"),
381 "sst_reliability_tests_tfm_sst_test_3xxx_",
382 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
383 ("psa_internal_trusted_storage_"
384 "s_interface_tests_tfm_its_test_2xxx_"),
385 "its_reliability_tests_tfm_its_test_3xxx_",
386 ("audit_"
387 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
388 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
389 ("initial_attestation_service_"
390 "secure_interface_tests_tfm_attest_test_1xxx_"),
391 ]
392 },
393 {
394 'name': 'Non_Secure_Test_Suites_Summary',
395 'start': 'Non-secure test suites summary',
396 'end': r'End of Non-secure test suites',
397 'pattern': r"Test suite '(?P<"
398 r"test_case_id>[^\n]+)' has (.*) "
399 r"(?P<result>PASSED|FAILED)",
400 'fixup': {"pass": "PASSED", "fail": "FAILED"},
401 'required': [
402 ("psa_protected_storage"
403 "_ns_interface_tests_tfm_sst_test_1xxx_"),
404 ("psa_internal_trusted_storage"
405 "_ns_interface_tests_tfm_its_test_1xxx_"),
406 ("auditlog_"
407 "non_secure_interface_test_tfm_audit_test_1xxx_"),
408 ("crypto_"
409 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
410 ("initial_attestation_service_"
411 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
412 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
413 ]
414 }
415 ] # Monitors
416 }, # Regression
417 'RegressionIPCTfmLevel2': {
418 "binaries": {
419 "firmware": "mcuboot.axf",
420 "bootloader": "tfm_s_ns_signed.bin"
421 },
422 "monitors": [
423 {
424 'name': 'Secure_Test_Suites_Summary',
425 'start': 'Secure test suites summary',
426 'end': 'End of Secure test suites',
427 'pattern': r"Test suite '(?P<"
428 r"test_case_id>[^\n]+)' has (.*) "
429 r"(?P<result>PASSED|FAILED)",
430 'fixup': {"pass": "PASSED", "fail": "FAILED"},
431 'required': [
432 ("psa_protected_storage_"
433 "s_interface_tests_tfm_sst_test_2xxx_"),
434 "sst_reliability_tests_tfm_sst_test_3xxx_",
435 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
436 ("psa_internal_trusted_storage_"
437 "s_interface_tests_tfm_its_test_2xxx_"),
438 "its_reliability_tests_tfm_its_test_3xxx_",
439 ("audit_"
440 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
441 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
442 ("initial_attestation_service_"
443 "secure_interface_tests_tfm_attest_test_1xxx_"),
444 ]
445 },
446 {
447 'name': 'Non_Secure_Test_Suites_Summary',
448 'start': 'Non-secure test suites summary',
449 'end': r'End of Non-secure test suites',
450 'pattern': r"Test suite '(?P<"
451 r"test_case_id>[^\n]+)' has (.*) "
Matthew Hartfb6fd362020-03-04 21:03:59 +0000452 r"(?P<result>PASSED|FAILED)",
453 'fixup': {"pass": "PASSED", "fail": "FAILED"},
454 'required': [
455 ("psa_protected_storage"
456 "_ns_interface_tests_tfm_sst_test_1xxx_"),
457 ("psa_internal_trusted_storage"
458 "_ns_interface_tests_tfm_its_test_1xxx_"),
459 ("auditlog_"
460 "non_secure_interface_test_tfm_audit_test_1xxx_"),
461 ("crypto_"
462 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
463 ("initial_attestation_service_"
464 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
465 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
466 ]
467 }
468 ] # Monitors
469 }, # Regression
Karl Zhang3b092ef2020-11-06 16:56:25 +0800470 'RegressionIPCTfmLevel3': {
471 "binaries": {
472 "firmware": "mcuboot.axf",
473 "bootloader": "tfm_s_ns_signed.bin"
474 },
475 "monitors": [
476 {
477 'name': 'Secure_Test_Suites_Summary',
478 'start': 'Secure test suites summary',
479 'end': 'End of Secure test suites',
480 'pattern': r"Test suite '(?P<"
481 r"test_case_id>[^\n]+)' has (.*) "
482 r"(?P<result>PASSED|FAILED)",
483 'fixup': {"pass": "PASSED", "fail": "FAILED"},
484 'required': [
485 ("psa_protected_storage_"
486 "s_interface_tests_tfm_sst_test_2xxx_"),
487 "sst_reliability_tests_tfm_sst_test_3xxx_",
488 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
489 ("psa_internal_trusted_storage_"
490 "s_interface_tests_tfm_its_test_2xxx_"),
491 "its_reliability_tests_tfm_its_test_3xxx_",
492 ("audit_"
493 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
494 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
495 ("initial_attestation_service_"
496 "secure_interface_tests_tfm_attest_test_1xxx_"),
497 ]
498 },
499 {
500 'name': 'Non_Secure_Test_Suites_Summary',
501 'start': 'Non-secure test suites summary',
502 'end': r'End of Non-secure test suites',
503 'pattern': r"Test suite '(?P<"
504 r"test_case_id>[^\n]+)' has (.*) "
505 r"(?P<result>PASSED|FAILED)",
506 'fixup': {"pass": "PASSED", "fail": "FAILED"},
507 'required': [
508 ("psa_protected_storage"
509 "_ns_interface_tests_tfm_sst_test_1xxx_"),
510 ("psa_internal_trusted_storage"
511 "_ns_interface_tests_tfm_its_test_1xxx_"),
512 ("auditlog_"
513 "non_secure_interface_test_tfm_audit_test_1xxx_"),
514 ("crypto_"
515 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
516 ("initial_attestation_service_"
517 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
518 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
519 ]
520 }
521 ] # Monitors
522 }, # Regression
Matthew Hartfb6fd362020-03-04 21:03:59 +0000523 'CoreIPC': {
524 "binaries": {
525 "firmware": "mcuboot.axf",
526 "bootloader": "tfm_s_ns_signed.bin"
527 },
528 "monitors": [
529 {
530 'name': 'Secure_Test_Suites_Summary',
531 'start': r'[Sec Thread]',
532 'end': r'system starting',
533 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
534 r'(?P<test_case_id>Secure image '
535 r'initializing)(?P<result>!)',
536 'fixup': {"pass": "!", "fail": ""},
537 'required': ["secure_image_initializing"]
538 } # Monitors
539 ]
540 }, # CoreIPC
541 'CoreIPCTfmLevel2': {
542 "binaries": {
543 "firmware": "mcuboot.axf",
544 "bootloader": "tfm_s_ns_signed.bin"
545 },
546 "monitors": [
547 {
548 'name': 'Secure_Test_Suites_Summary',
549 'start': r'[Sec Thread]',
550 'end': r'system starting',
551 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
552 r'(?P<test_case_id>Secure image '
553 r'initializing)(?P<result>!)',
554 'fixup': {"pass": "!", "fail": ""},
555 'required': ["secure_image_initializing"]
556 } # Monitors
557 ]
558 }, # CoreIPCTfmLevel2
559 } # Tests
560}
561
562
Matthew Hart2c2688f2020-05-26 13:09:20 +0100563fvp_mps2_an521_nobl2 = {
564 "templ": "fvp_mps2.jinja2",
565 "job_name": "fvp_mps2_an521_nobl2",
Matthew Hartfb6fd362020-03-04 21:03:59 +0000566 "device_type": "fvp",
Matthew Hart2c2688f2020-05-26 13:09:20 +0100567 "job_timeout": 15,
568 "action_timeout": 10,
569 "monitor_timeout": 10,
Matthew Hartfb6fd362020-03-04 21:03:59 +0000570 "poweroff_timeout": 1,
Dean Birch1d545c02020-05-29 14:09:21 +0100571 "platforms": {"AN521": ""},
Matthew Hartfb6fd362020-03-04 21:03:59 +0000572 "compilers": ["GNUARM", "ARMCLANG"],
Matthew Hart2c2688f2020-05-26 13:09:20 +0100573 "build_types": ["Debug", "Release", "Minsizerel"],
Matthew Hartfb6fd362020-03-04 21:03:59 +0000574 "boot_types": ["NOBL2"],
575 "data_bin_offset": "0x00100000",
Dean Birch1d545c02020-05-29 14:09:21 +0100576 "cpu_baseline": 1,
Dean Bircha6ede7e2020-03-13 14:00:33 +0000577 "tests": {
578 'Default': {
579 "binaries": {
580 "firmware": "tfm_s.axf",
581 "bootloader": "tfm_ns.bin"
582 },
583 "monitors": [
584 {
585 'name': 'Secure_Test_Suites_Summary',
Matthew Hartfb6fd362020-03-04 21:03:59 +0000586 'start': r'[Sec Thread]',
587 'end': r'system starting',
Dean Bircha6ede7e2020-03-13 14:00:33 +0000588 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
589 r'(?P<test_case_id>Secure image '
590 r'initializing)(?P<result>!)',
591 'fixup': {"pass": "!", "fail": ""},
592 'required': ["secure_image_initializing"]
Matthew Hartfb6fd362020-03-04 21:03:59 +0000593 }
Dean Bircha6ede7e2020-03-13 14:00:33 +0000594 ]
595 }, # Default
596 'Regression': {
597 "binaries": {
598 "firmware": "tfm_s.axf",
599 "bootloader": "tfm_ns.bin"
600 },
601 "monitors": [
602 {
603 'name': 'Secure_Test_Suites_Summary',
604 'start': 'Secure test suites summary',
605 'end': 'End of Secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100606 'pattern': r"Test suite '(?P<"
607 r"test_case_id>[^\n]+)' has (.*) "
Dean Bircha6ede7e2020-03-13 14:00:33 +0000608 r"(?P<result>PASSED|FAILED)",
609 'fixup': {"pass": "PASSED", "fail": "FAILED"},
610 'required': [
611 ("psa_protected_storage_"
612 "s_interface_tests_tfm_sst_test_2xxx_"),
613 "sst_reliability_tests_tfm_sst_test_3xxx_",
614 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
615 ("psa_internal_trusted_storage_"
616 "s_interface_tests_tfm_its_test_2xxx_"),
617 "its_reliability_tests_tfm_its_test_3xxx_",
618 ("audit_"
619 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
620 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
621 ("initial_attestation_service_"
622 "secure_interface_tests_tfm_attest_test_1xxx_"),
623 ]
624 },
625 {
626 'name': 'Non_Secure_Test_Suites_Summary',
627 'start': 'Non-secure test suites summary',
628 'end': r'End of Non-secure test suites',
Matthew Hart2c2688f2020-05-26 13:09:20 +0100629 'pattern': r"Test suite '(?P<"
630 r"test_case_id>[^\n]+)' has (.*) "
Dean Bircha6ede7e2020-03-13 14:00:33 +0000631 r"(?P<result>PASSED|FAILED)",
632 'fixup': {"pass": "PASSED", "fail": "FAILED"},
633 'required': [
634 ("psa_protected_storage"
635 "_ns_interface_tests_tfm_sst_test_1xxx_"),
636 ("psa_internal_trusted_storage"
637 "_ns_interface_tests_tfm_its_test_1xxx_"),
638 ("auditlog_"
639 "non_secure_interface_test_tfm_audit_test_1xxx_"),
640 ("crypto_"
641 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
642 ("initial_attestation_service_"
643 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
644 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
645 ]
646 }
647 ] # Monitors
648 }, # Regression
Matthew Hart2c2688f2020-05-26 13:09:20 +0100649 'RegressionIPC': {
650 "binaries": {
651 "firmware": "tfm_s.axf",
652 "bootloader": "tfm_ns.bin"
653 },
654 "monitors": [
655 {
656 'name': 'Secure_Test_Suites_Summary',
657 'start': 'Secure test suites summary',
658 'end': 'End of Secure test suites',
659 'pattern': r"Test suite '(?P<"
660 r"test_case_id>[^\n]+)' has (.*) "
661 r"(?P<result>PASSED|FAILED)",
662 'fixup': {"pass": "PASSED", "fail": "FAILED"},
663 'required': [
664 ("psa_protected_storage_"
665 "s_interface_tests_tfm_sst_test_2xxx_"),
666 "sst_reliability_tests_tfm_sst_test_3xxx_",
667 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
668 ("psa_internal_trusted_storage_"
669 "s_interface_tests_tfm_its_test_2xxx_"),
670 "its_reliability_tests_tfm_its_test_3xxx_",
671 ("audit_"
672 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
673 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
674 ("initial_attestation_service_"
675 "secure_interface_tests_tfm_attest_test_1xxx_"),
676 ]
677 },
678 {
679 'name': 'Non_Secure_Test_Suites_Summary',
680 'start': 'Non-secure test suites summary',
681 'end': r'End of Non-secure test suites',
682 'pattern': r"Test suite '(?P<"
683 r"test_case_id>[^\n]+)' has (.*) "
684 r"(?P<result>PASSED|FAILED)",
685 'fixup': {"pass": "PASSED", "fail": "FAILED"},
686 'required': [
687 ("psa_protected_storage"
688 "_ns_interface_tests_tfm_sst_test_1xxx_"),
689 ("psa_internal_trusted_storage"
690 "_ns_interface_tests_tfm_its_test_1xxx_"),
691 ("auditlog_"
692 "non_secure_interface_test_tfm_audit_test_1xxx_"),
693 ("crypto_"
694 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
695 ("initial_attestation_service_"
696 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
697 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
698 ]
699 }
700 ] # Monitors
701 }, # RegressionIPC
702 'RegressionIPCTfmLevel2': {
703 "binaries": {
704 "firmware": "tfm_s.axf",
705 "bootloader": "tfm_ns.bin"
706 },
707 "monitors": [
708 {
709 'name': 'Secure_Test_Suites_Summary',
710 'start': 'Secure test suites summary',
711 'end': 'End of Secure test suites',
712 'pattern': r"Test suite '(?P<"
713 r"test_case_id>[^\n]+)' has (.*) "
714 r"(?P<result>PASSED|FAILED)",
715 'fixup': {"pass": "PASSED", "fail": "FAILED"},
716 'required': [
717 ("psa_protected_storage_"
718 "s_interface_tests_tfm_sst_test_2xxx_"),
719 "sst_reliability_tests_tfm_sst_test_3xxx_",
720 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
721 ("psa_internal_trusted_storage_"
722 "s_interface_tests_tfm_its_test_2xxx_"),
723 "its_reliability_tests_tfm_its_test_3xxx_",
724 ("audit_"
725 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
726 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
727 ("initial_attestation_service_"
728 "secure_interface_tests_tfm_attest_test_1xxx_"),
729 ]
730 },
731 {
732 'name': 'Non_Secure_Test_Suites_Summary',
733 'start': 'Non-secure test suites summary',
734 'end': r'End of Non-secure test suites',
735 'pattern': r"Test suite '(?P<"
736 r"test_case_id>[^\n]+)' has (.*) "
737 r"(?P<result>PASSED|FAILED)",
738 'fixup': {"pass": "PASSED", "fail": "FAILED"},
739 'required': [
740 ("psa_protected_storage"
741 "_ns_interface_tests_tfm_sst_test_1xxx_"),
742 ("psa_internal_trusted_storage"
743 "_ns_interface_tests_tfm_its_test_1xxx_"),
744 ("auditlog_"
745 "non_secure_interface_test_tfm_audit_test_1xxx_"),
746 ("crypto_"
747 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
748 ("initial_attestation_service_"
749 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
750 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
751 ]
752 }
753 ] # Monitors
754 }, # RegressionIPCTfmLevel2
Karl Zhang3b092ef2020-11-06 16:56:25 +0800755 'RegressionIPCTfmLevel3': {
756 "binaries": {
757 "firmware": "tfm_s.axf",
758 "bootloader": "tfm_ns.bin"
759 },
760 "monitors": [
761 {
762 'name': 'Secure_Test_Suites_Summary',
763 'start': 'Secure test suites summary',
764 'end': 'End of Secure test suites',
765 'pattern': r"Test suite '(?P<"
766 r"test_case_id>[^\n]+)' has (.*) "
767 r"(?P<result>PASSED|FAILED)",
768 'fixup': {"pass": "PASSED", "fail": "FAILED"},
769 'required': [
770 ("psa_protected_storage_"
771 "s_interface_tests_tfm_sst_test_2xxx_"),
772 "sst_reliability_tests_tfm_sst_test_3xxx_",
773 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
774 ("psa_internal_trusted_storage_"
775 "s_interface_tests_tfm_its_test_2xxx_"),
776 "its_reliability_tests_tfm_its_test_3xxx_",
777 ("audit_"
778 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
779 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
780 ("initial_attestation_service_"
781 "secure_interface_tests_tfm_attest_test_1xxx_"),
782 ]
783 },
784 {
785 'name': 'Non_Secure_Test_Suites_Summary',
786 'start': 'Non-secure test suites summary',
787 'end': r'End of Non-secure test suites',
788 'pattern': r"Test suite '(?P<"
789 r"test_case_id>[^\n]+)' has (.*) "
790 r"(?P<result>PASSED|FAILED)",
791 'fixup': {"pass": "PASSED", "fail": "FAILED"},
792 'required': [
793 ("psa_protected_storage"
794 "_ns_interface_tests_tfm_sst_test_1xxx_"),
795 ("psa_internal_trusted_storage"
796 "_ns_interface_tests_tfm_its_test_1xxx_"),
797 ("auditlog_"
798 "non_secure_interface_test_tfm_audit_test_1xxx_"),
799 ("crypto_"
800 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
801 ("initial_attestation_service_"
802 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
803 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
804 ]
805 }
806 ] # Monitors
807 }, # RegressionIPCTfmLevel3
Dean Bircha6ede7e2020-03-13 14:00:33 +0000808 'CoreIPC': {
809 "binaries": {
810 "firmware": "tfm_s.axf",
811 "bootloader": "tfm_ns.bin"
812 },
813 "monitors": [
814 {
815 'name': 'Secure_Test_Suites_Summary',
Matthew Hartfb6fd362020-03-04 21:03:59 +0000816 'start': r'[Sec Thread]',
817 'end': r'system starting',
Dean Bircha6ede7e2020-03-13 14:00:33 +0000818 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
819 r'(?P<test_case_id>Secure image '
820 r'initializing)(?P<result>!)',
821 'fixup': {"pass": "!", "fail": ""},
822 'required': ["secure_image_initializing"]
823 } # Monitors
824 ]
825 }, # CoreIPC
826 'CoreIPCTfmLevel2': {
827 "binaries": {
828 "firmware": "tfm_s.axf",
829 "bootloader": "tfm_ns.bin"
830 },
831 "monitors": [
832 {
833 'name': 'Secure_Test_Suites_Summary',
Matthew Hartfb6fd362020-03-04 21:03:59 +0000834 'start': r'[Sec Thread]',
835 'end': r'system starting',
Dean Bircha6ede7e2020-03-13 14:00:33 +0000836 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
837 r'(?P<test_case_id>Secure image '
838 r'initializing)(?P<result>!)',
839 'fixup': {"pass": "!", "fail": ""},
840 'required': ["secure_image_initializing"]
841 } # Monitors
842 ]
843 }, # CoreIPCTfmLevel2
844 } # Tests
845}
846
Matthew Hart2c2688f2020-05-26 13:09:20 +0100847
848fvp_mps2_an519_bl2 = {
849 "templ": "fvp_mps2.jinja2",
850 "job_name": "fvp_mps2_an519_bl2",
851 "device_type": "fvp",
852 "job_timeout": 15,
853 "action_timeout": 10,
854 "monitor_timeout": 10,
855 "poweroff_timeout": 1,
856 "platforms": {"AN519": ""},
857 "compilers": ["GNUARM", "ARMCLANG"],
858 "build_types": ["Debug", "Release", "Minsizerel"],
859 "boot_types": ["BL2"],
860 "data_bin_offset": "0x10080000",
861 "cpu0_baseline": 1,
862 "tests": {
863 'Default': {
864 "binaries": {
865 "firmware": "mcuboot.axf",
866 "bootloader": "tfm_s_ns_signed.bin"
867 },
868 "monitors": [
869 {
870 'name': 'Secure_Test_Suites_Summary',
871 'start': r'[Sec Thread]',
872 'end': r'system starting',
873 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
874 r'(?P<test_case_id>Secure image '
875 r'initializing)(?P<result>!)',
876 'fixup': {"pass": "!", "fail": ""},
877 'required': ["secure_image_initializing"]
878 } # Monitors
879 ]
880 }, # Default
881 'Regression': {
882 "binaries": {
883 "firmware": "mcuboot.axf",
884 "bootloader": "tfm_s_ns_signed.bin"
885 },
886 "monitors": [
887 {
888 'name': 'Secure_Test_Suites_Summary',
889 'start': 'Secure test suites summary',
890 'end': 'End of Secure test suites',
891 'pattern': r"Test suite '(?P<"
892 r"test_case_id>[^\n]+)' has (.*) "
893 r"(?P<result>PASSED|FAILED)",
894 'fixup': {"pass": "PASSED", "fail": "FAILED"},
895 'required': [
896 ("psa_protected_storage_"
897 "s_interface_tests_tfm_sst_test_2xxx_"),
898 "sst_reliability_tests_tfm_sst_test_3xxx_",
899 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
900 ("psa_internal_trusted_storage_"
901 "s_interface_tests_tfm_its_test_2xxx_"),
902 "its_reliability_tests_tfm_its_test_3xxx_",
903 ("audit_"
904 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
905 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
906 ("initial_attestation_service_"
907 "secure_interface_tests_tfm_attest_test_1xxx_"),
908 ]
909 },
910 {
911 'name': 'Non_Secure_Test_Suites_Summary',
912 'start': 'Non-secure test suites summary',
913 'end': r'End of Non-secure test suites',
914 'pattern': r"Test suite '(?P<"
915 r"test_case_id>[^\n]+)' has (.*) "
916 r"(?P<result>PASSED|FAILED)",
917 'fixup': {"pass": "PASSED", "fail": "FAILED"},
918 'required': [
919 ("psa_protected_storage"
920 "_ns_interface_tests_tfm_sst_test_1xxx_"),
921 ("psa_internal_trusted_storage"
922 "_ns_interface_tests_tfm_its_test_1xxx_"),
923 ("auditlog_"
924 "non_secure_interface_test_tfm_audit_test_1xxx_"),
925 ("crypto_"
926 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
927 ("initial_attestation_service_"
928 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
929 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
930 ]
931 }
932 ] # Monitors
933 }, # Regression
934 'RegressionIPC': {
935 "binaries": {
936 "firmware": "mcuboot.axf",
937 "bootloader": "tfm_s_ns_signed.bin"
938 },
939 "monitors": [
940 {
941 'name': 'Secure_Test_Suites_Summary',
942 'start': 'Secure test suites summary',
943 'end': 'End of Secure test suites',
944 'pattern': r"Test suite '(?P<"
945 r"test_case_id>[^\n]+)' has (.*) "
946 r"(?P<result>PASSED|FAILED)",
947 'fixup': {"pass": "PASSED", "fail": "FAILED"},
948 'required': [
949 ("psa_protected_storage_"
950 "s_interface_tests_tfm_sst_test_2xxx_"),
951 "sst_reliability_tests_tfm_sst_test_3xxx_",
952 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
953 ("psa_internal_trusted_storage_"
954 "s_interface_tests_tfm_its_test_2xxx_"),
955 "its_reliability_tests_tfm_its_test_3xxx_",
956 ("audit_"
957 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
958 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
959 ("initial_attestation_service_"
960 "secure_interface_tests_tfm_attest_test_1xxx_"),
961 ]
962 },
963 {
964 'name': 'Non_Secure_Test_Suites_Summary',
965 'start': 'Non-secure test suites summary',
966 'end': r'End of Non-secure test suites',
967 'pattern': r"Test suite '(?P<"
968 r"test_case_id>[^\n]+)' has (.*) "
969 r"(?P<result>PASSED|FAILED)",
970 'fixup': {"pass": "PASSED", "fail": "FAILED"},
971 'required': [
972 ("psa_protected_storage"
973 "_ns_interface_tests_tfm_sst_test_1xxx_"),
974 ("psa_internal_trusted_storage"
975 "_ns_interface_tests_tfm_its_test_1xxx_"),
976 ("auditlog_"
977 "non_secure_interface_test_tfm_audit_test_1xxx_"),
978 ("crypto_"
979 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
980 ("initial_attestation_service_"
981 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
982 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
983 ]
984 }
985 ] # Monitors
986 }, # Regression
987 'RegressionIPCTfmLevel2': {
988 "binaries": {
989 "firmware": "mcuboot.axf",
990 "bootloader": "tfm_s_ns_signed.bin"
991 },
992 "monitors": [
993 {
994 'name': 'Secure_Test_Suites_Summary',
995 'start': 'Secure test suites summary',
996 'end': 'End of Secure test suites',
997 'pattern': r"Test suite '(?P<"
998 r"test_case_id>[^\n]+)' has (.*) "
999 r"(?P<result>PASSED|FAILED)",
1000 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1001 'required': [
1002 ("psa_protected_storage_"
1003 "s_interface_tests_tfm_sst_test_2xxx_"),
1004 "sst_reliability_tests_tfm_sst_test_3xxx_",
1005 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
1006 ("psa_internal_trusted_storage_"
1007 "s_interface_tests_tfm_its_test_2xxx_"),
1008 "its_reliability_tests_tfm_its_test_3xxx_",
1009 ("audit_"
1010 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
1011 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
1012 ("initial_attestation_service_"
1013 "secure_interface_tests_tfm_attest_test_1xxx_"),
1014 ]
1015 },
1016 {
1017 'name': 'Non_Secure_Test_Suites_Summary',
1018 'start': 'Non-secure test suites summary',
1019 'end': r'End of Non-secure test suites',
1020 'pattern': r"Test suite '(?P<"
1021 r"test_case_id>[^\n]+)' has (.*) "
1022 r"(?P<result>PASSED|FAILED)",
1023 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1024 'required': [
1025 ("psa_protected_storage"
1026 "_ns_interface_tests_tfm_sst_test_1xxx_"),
1027 ("psa_internal_trusted_storage"
1028 "_ns_interface_tests_tfm_its_test_1xxx_"),
1029 ("auditlog_"
1030 "non_secure_interface_test_tfm_audit_test_1xxx_"),
1031 ("crypto_"
1032 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
1033 ("initial_attestation_service_"
1034 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
1035 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
1036 ]
1037 }
1038 ] # Monitors
1039 }, # Regression
1040 'CoreIPC': {
1041 "binaries": {
1042 "firmware": "mcuboot.axf",
1043 "bootloader": "tfm_s_ns_signed.bin"
1044 },
1045 "monitors": [
1046 {
1047 'name': 'Secure_Test_Suites_Summary',
1048 'start': r'[Sec Thread]',
1049 'end': r'system starting',
1050 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
1051 r'(?P<test_case_id>Secure image '
1052 r'initializing)(?P<result>!)',
1053 'fixup': {"pass": "!", "fail": ""},
1054 'required': ["secure_image_initializing"]
1055 } # Monitors
1056 ]
1057 }, # CoreIPC
1058 'CoreIPCTfmLevel2': {
1059 "binaries": {
1060 "firmware": "mcuboot.axf",
1061 "bootloader": "tfm_s_ns_signed.bin"
1062 },
1063 "monitors": [
1064 {
1065 'name': 'Secure_Test_Suites_Summary',
1066 'start': r'[Sec Thread]',
1067 'end': r'system starting',
1068 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
1069 r'(?P<test_case_id>Secure image '
1070 r'initializing)(?P<result>!)',
1071 'fixup': {"pass": "!", "fail": ""},
1072 'required': ["secure_image_initializing"]
1073 } # Monitors
1074 ]
1075 }, # CoreIPCTfmLevel2
1076 } # Tests
1077}
1078
1079
1080fvp_mps2_an519_nobl2 = {
1081 "templ": "fvp_mps2.jinja2",
1082 "job_name": "fvp_mps2_an519_nobl2",
1083 "device_type": "fvp",
1084 "job_timeout": 15,
1085 "action_timeout": 10,
1086 "monitor_timeout": 10,
1087 "poweroff_timeout": 1,
1088 "platforms": {"AN519": ""},
1089 "compilers": ["GNUARM", "ARMCLANG"],
1090 "build_types": ["Debug", "Release", "Minsizerel"],
1091 "boot_types": ["NOBL2"],
1092 "data_bin_offset": "0x00100000",
1093 "cpu0_baseline": 1,
1094 "tests": {
1095 'Default': {
1096 "binaries": {
1097 "firmware": "tfm_s.axf",
1098 "bootloader": "tfm_ns.bin"
1099 },
1100 "monitors": [
1101 {
1102 'name': 'Secure_Test_Suites_Summary',
1103 'start': r'[Sec Thread]',
1104 'end': r'system starting',
1105 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
1106 r'(?P<test_case_id>Secure image '
1107 r'initializing)(?P<result>!)',
1108 'fixup': {"pass": "!", "fail": ""},
1109 'required': ["secure_image_initializing"]
1110 }
1111 ]
1112 }, # Default
1113 'Regression': {
1114 "binaries": {
1115 "firmware": "tfm_s.axf",
1116 "bootloader": "tfm_ns.bin"
1117 },
1118 "monitors": [
1119 {
1120 'name': 'Secure_Test_Suites_Summary',
1121 'start': 'Secure test suites summary',
1122 'end': 'End of Secure test suites',
1123 'pattern': r"Test suite '(?P<"
1124 r"test_case_id>[^\n]+)' has (.*) "
1125 r"(?P<result>PASSED|FAILED)",
1126 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1127 'required': [
1128 ("psa_protected_storage_"
1129 "s_interface_tests_tfm_sst_test_2xxx_"),
1130 "sst_reliability_tests_tfm_sst_test_3xxx_",
1131 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
1132 ("psa_internal_trusted_storage_"
1133 "s_interface_tests_tfm_its_test_2xxx_"),
1134 "its_reliability_tests_tfm_its_test_3xxx_",
1135 ("audit_"
1136 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
1137 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
1138 ("initial_attestation_service_"
1139 "secure_interface_tests_tfm_attest_test_1xxx_"),
1140 ]
1141 },
1142 {
1143 'name': 'Non_Secure_Test_Suites_Summary',
1144 'start': 'Non-secure test suites summary',
1145 'end': r'End of Non-secure test suites',
1146 'pattern': r"Test suite '(?P<"
1147 r"test_case_id>[^\n]+)' has (.*) "
1148 r"(?P<result>PASSED|FAILED)",
1149 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1150 'required': [
1151 ("psa_protected_storage"
1152 "_ns_interface_tests_tfm_sst_test_1xxx_"),
1153 ("psa_internal_trusted_storage"
1154 "_ns_interface_tests_tfm_its_test_1xxx_"),
1155 ("auditlog_"
1156 "non_secure_interface_test_tfm_audit_test_1xxx_"),
1157 ("crypto_"
1158 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
1159 ("initial_attestation_service_"
1160 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
1161 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
1162 ]
1163 }
1164 ] # Monitors
1165 }, # Regression
1166 'RegressionIPC': {
1167 "binaries": {
1168 "firmware": "tfm_s.axf",
1169 "bootloader": "tfm_ns.bin"
1170 },
1171 "monitors": [
1172 {
1173 'name': 'Secure_Test_Suites_Summary',
1174 'start': 'Secure test suites summary',
1175 'end': 'End of Secure test suites',
1176 'pattern': r"Test suite '(?P<"
1177 r"test_case_id>[^\n]+)' has (.*) "
1178 r"(?P<result>PASSED|FAILED)",
1179 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1180 'required': [
1181 ("psa_protected_storage_"
1182 "s_interface_tests_tfm_sst_test_2xxx_"),
1183 "sst_reliability_tests_tfm_sst_test_3xxx_",
1184 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
1185 ("psa_internal_trusted_storage_"
1186 "s_interface_tests_tfm_its_test_2xxx_"),
1187 "its_reliability_tests_tfm_its_test_3xxx_",
1188 ("audit_"
1189 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
1190 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
1191 ("initial_attestation_service_"
1192 "secure_interface_tests_tfm_attest_test_1xxx_"),
1193 ]
1194 },
1195 {
1196 'name': 'Non_Secure_Test_Suites_Summary',
1197 'start': 'Non-secure test suites summary',
1198 'end': r'End of Non-secure test suites',
1199 'pattern': r"Test suite '(?P<"
1200 r"test_case_id>[^\n]+)' has (.*) "
1201 r"(?P<result>PASSED|FAILED)",
1202 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1203 'required': [
1204 ("psa_protected_storage"
1205 "_ns_interface_tests_tfm_sst_test_1xxx_"),
1206 ("psa_internal_trusted_storage"
1207 "_ns_interface_tests_tfm_its_test_1xxx_"),
1208 ("auditlog_"
1209 "non_secure_interface_test_tfm_audit_test_1xxx_"),
1210 ("crypto_"
1211 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
1212 ("initial_attestation_service_"
1213 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
1214 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
1215 ]
1216 }
1217 ] # Monitors
1218 }, # RegressionIPC
1219 'RegressionIPCTfmLevel2': {
1220 "binaries": {
1221 "firmware": "tfm_s.axf",
1222 "bootloader": "tfm_ns.bin"
1223 },
1224 "monitors": [
1225 {
1226 'name': 'Secure_Test_Suites_Summary',
1227 'start': 'Secure test suites summary',
1228 'end': 'End of Secure test suites',
1229 'pattern': r"Test suite '(?P<"
1230 r"test_case_id>[^\n]+)' has (.*) "
1231 r"(?P<result>PASSED|FAILED)",
1232 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1233 'required': [
1234 ("psa_protected_storage_"
1235 "s_interface_tests_tfm_sst_test_2xxx_"),
1236 "sst_reliability_tests_tfm_sst_test_3xxx_",
1237 "sst_rollback_protection_tests_tfm_sst_test_4xxx_",
1238 ("psa_internal_trusted_storage_"
1239 "s_interface_tests_tfm_its_test_2xxx_"),
1240 "its_reliability_tests_tfm_its_test_3xxx_",
1241 ("audit_"
1242 "logging_secure_interface_test_tfm_audit_test_1xxx_"),
1243 "crypto_secure_interface_tests_tfm_crypto_test_5xxx_",
1244 ("initial_attestation_service_"
1245 "secure_interface_tests_tfm_attest_test_1xxx_"),
1246 ]
1247 },
1248 {
1249 'name': 'Non_Secure_Test_Suites_Summary',
1250 'start': 'Non-secure test suites summary',
1251 'end': r'End of Non-secure test suites',
1252 'pattern': r"Test suite '(?P<"
1253 r"test_case_id>[^\n]+)' has (.*) "
1254 r"(?P<result>PASSED|FAILED)",
1255 'fixup': {"pass": "PASSED", "fail": "FAILED"},
1256 'required': [
1257 ("psa_protected_storage"
1258 "_ns_interface_tests_tfm_sst_test_1xxx_"),
1259 ("psa_internal_trusted_storage"
1260 "_ns_interface_tests_tfm_its_test_1xxx_"),
1261 ("auditlog_"
1262 "non_secure_interface_test_tfm_audit_test_1xxx_"),
1263 ("crypto_"
1264 "non_secure_interface_test_tfm_crypto_test_6xxx_"),
1265 ("initial_attestation_service_"
1266 "non_secure_interface_tests_tfm_attest_test_2xxx_"),
1267 "core_non_secure_positive_tests_tfm_core_test_1xxx_"
1268 ]
1269 }
1270 ] # Monitors
1271 }, # RegressionIPCTfmLevel2
1272 'CoreIPC': {
1273 "binaries": {
1274 "firmware": "tfm_s.axf",
1275 "bootloader": "tfm_ns.bin"
1276 },
1277 "monitors": [
1278 {
1279 'name': 'Secure_Test_Suites_Summary',
1280 'start': r'[Sec Thread]',
1281 'end': r'system starting',
1282 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
1283 r'(?P<test_case_id>Secure image '
1284 r'initializing)(?P<result>!)',
1285 'fixup': {"pass": "!", "fail": ""},
1286 'required': ["secure_image_initializing"]
1287 } # Monitors
1288 ]
1289 }, # CoreIPC
1290 'CoreIPCTfmLevel2': {
1291 "binaries": {
1292 "firmware": "tfm_s.axf",
1293 "bootloader": "tfm_ns.bin"
1294 },
1295 "monitors": [
1296 {
1297 'name': 'Secure_Test_Suites_Summary',
1298 'start': r'[Sec Thread]',
1299 'end': r'system starting',
1300 'pattern': r'\x1b\\[1;34m\\[Sec Thread\\] '
1301 r'(?P<test_case_id>Secure image '
1302 r'initializing)(?P<result>!)',
1303 'fixup': {"pass": "!", "fail": ""},
1304 'required': ["secure_image_initializing"]
1305 } # Monitors
1306 ]
1307 }, # CoreIPCTfmLevel2
1308 } # Tests
1309}
1310
1311
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001312# All configurations should be mapped here
Matthew Hart2c2688f2020-05-26 13:09:20 +01001313lava_gen_config_map = {"mps2_an521_bl2": tfm_mps2_sse_200,
1314 "fvp_mps2_an521_bl2": fvp_mps2_an521_bl2,
1315 "fvp_mps2_an521_nobl2": fvp_mps2_an521_nobl2,
1316 "fvp_mps2_an519_bl2": fvp_mps2_an519_bl2,
1317 "fvp_mps2_an519_nobl2": fvp_mps2_an519_nobl2}
1318
Minos Galanakisf4ca6ac2017-12-11 02:39:21 +01001319lavagen_config_sort_order = [
1320 "templ",
1321 "job_name",
1322 "device_type",
1323 "job_timeout",
1324 "action_timeout",
1325 "monitor_timeout",
1326 "recovery_store_url",
1327 "artifact_store_url",
1328 "platforms",
1329 "compilers",
1330 "build_types",
1331 "boot_types",
1332 "tests"
1333]
1334
1335lava_gen_monitor_sort_order = [
1336 'name',
1337 'start',
1338 'end',
1339 'pattern',
1340 'fixup',
1341]
1342
1343if __name__ == "__main__":
1344 import os
1345 import sys
1346 from lava_helper import sort_lavagen_config
1347 try:
1348 from tfm_ci_pylib.utils import export_config_map
1349 except ImportError:
1350 dir_path = os.path.dirname(os.path.realpath(__file__))
1351 sys.path.append(os.path.join(dir_path, "../"))
1352 from tfm_ci_pylib.utils import export_config_map
1353
1354 if len(sys.argv) == 2:
1355 if sys.argv[1] == "--export":
1356 export_config_map(lava_gen_config_map)
1357 if len(sys.argv) == 3:
1358 if sys.argv[1] == "--export":
1359 export_config_map(sort_lavagen_config(lava_gen_config_map),
1360 sys.argv[2])