Marc Moreno Berengue | ffd3c46 | 2017-11-29 16:09:52 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2017, Arm Limited. All rights reserved. |
| 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 | |
| 23 | /* FIXME: this test suite needs to be refactored to accomodate it to |
| 24 | * use only secure application ID. |
| 25 | * |
| 26 | * {®ister_testsuite_s_sst_interface, 0, 0, 0}, |
| 27 | */ |
| 28 | |
| 29 | #ifdef CORE_TEST_SERVICES |
| 30 | /* Secure invert test cases */ |
| 31 | /* Note: since this is sample code, only run if test services are enabled */ |
| 32 | {®ister_testsuite_s_invert_interface, 0, 0, 0}, |
| 33 | #endif |
| 34 | #endif /* SERVICES_TEST_S */ |
| 35 | }; |
| 36 | |
| 37 | static void setup_integ_test(void) |
| 38 | { |
| 39 | /* Left empty intentionally, currently implemented |
| 40 | * test suites require no setup |
| 41 | */ |
| 42 | } |
| 43 | |
| 44 | static void tear_down_integ_test(void) |
| 45 | { |
| 46 | /* Leave the SST area clean after execute the tests */ |
| 47 | sst_object_wipe_all(); |
| 48 | sst_object_prepare(); |
| 49 | } |
| 50 | |
| 51 | void start_integ_test(void) |
| 52 | { |
| 53 | setup_integ_test(); |
| 54 | integ_test("Secure", |
| 55 | test_suites, |
| 56 | sizeof(test_suites)/sizeof(test_suites[0])); |
| 57 | tear_down_integ_test(); |
| 58 | } |