Marc Moreno Berengue | ffd3c46 | 2017-11-29 16:09:52 +0000 | [diff] [blame] | 1 | /* |
Mate Toth-Pal | 349714a | 2018-02-23 15:30:24 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2018, Arm Limited. All rights reserved. |
Marc Moreno Berengue | ffd3c46 | 2017-11-29 16:09:52 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include "integ_test.h" |
| 9 | #include "integ_test_helper.h" |
| 10 | #include "test_framework.h" |
| 11 | |
| 12 | /* Service specific includes */ |
| 13 | #include "test/suites/sst/secure/sst_tests.h" |
| 14 | #include "test/suites/invert/secure/invert_s_tests.h" |
| 15 | #include "secure_fw/services/secure_storage/sst_core_interface.h" |
| 16 | |
| 17 | static struct test_suite_t test_suites[] = { |
| 18 | #ifdef SERVICES_TEST_S |
| 19 | /* Secure SST test cases */ |
| 20 | {®ister_testsuite_s_sst_sec_interface, 0, 0, 0}, |
| 21 | {®ister_testsuite_s_sst_reliability, 0, 0, 0}, |
| 22 | |
Mate Toth-Pal | 349714a | 2018-02-23 15:30:24 +0100 | [diff] [blame] | 23 | #ifdef TFM_PARTITION_TEST_CORE |
Marc Moreno Berengue | ffd3c46 | 2017-11-29 16:09:52 +0000 | [diff] [blame] | 24 | /* Secure invert test cases */ |
| 25 | /* Note: since this is sample code, only run if test services are enabled */ |
| 26 | {®ister_testsuite_s_invert_interface, 0, 0, 0}, |
| 27 | #endif |
| 28 | #endif /* SERVICES_TEST_S */ |
| 29 | }; |
| 30 | |
| 31 | static void setup_integ_test(void) |
| 32 | { |
| 33 | /* Left empty intentionally, currently implemented |
| 34 | * test suites require no setup |
| 35 | */ |
| 36 | } |
| 37 | |
| 38 | static void tear_down_integ_test(void) |
| 39 | { |
| 40 | /* Leave the SST area clean after execute the tests */ |
| 41 | sst_object_wipe_all(); |
| 42 | sst_object_prepare(); |
| 43 | } |
| 44 | |
| 45 | void start_integ_test(void) |
| 46 | { |
| 47 | setup_integ_test(); |
| 48 | integ_test("Secure", |
| 49 | test_suites, |
| 50 | sizeof(test_suites)/sizeof(test_suites[0])); |
| 51 | tear_down_integ_test(); |
| 52 | } |