Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017-2020, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include "tfm_integ_test.h" |
Paul Sokolovsky | 5d7925e | 2022-03-15 12:13:53 +0300 | [diff] [blame^] | 9 | #include "tfm_log.h" |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 10 | |
| 11 | #ifdef TEST_FRAMEWORK_NS |
Raef Coles | 5ee45ed | 2020-09-24 11:25:44 +0100 | [diff] [blame] | 12 | #include "test_framework_integ_test.h" |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 13 | #endif |
| 14 | |
shejia01 | 26b2d78 | 2021-08-19 17:08:24 +0800 | [diff] [blame] | 15 | #if defined(TEST_FRAMEWORK_S) && defined(TFM_LIB_MODEL) |
| 16 | /* Function tfm_secure_client_run_tests() which is declared in |
| 17 | * tfm_secure_client_service_api.h is only required in NS for Library mode. */ |
Raef Coles | 5ee45ed | 2020-09-24 11:25:44 +0100 | [diff] [blame] | 18 | #include "tfm_secure_client_service_api.h" |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 19 | #endif |
| 20 | |
| 21 | #if defined(TEST_FRAMEWORK_NS) || defined(TEST_FRAMEWORK_S) |
| 22 | /** |
| 23 | * \brief Services test thread |
| 24 | * |
| 25 | */ |
| 26 | __attribute__((noreturn)) |
| 27 | void test_app(void *argument) |
| 28 | { |
| 29 | UNUSED_VARIABLE(argument); |
| 30 | |
shejia01 | 26b2d78 | 2021-08-19 17:08:24 +0800 | [diff] [blame] | 31 | #if defined(TEST_FRAMEWORK_S) && defined(TFM_LIB_MODEL) |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 32 | /* FIXME: The non-secure audit log test currently relies on the fact that |
| 33 | * the audit log secure test is run first. However the Non-secure tests |
| 34 | * represent simpler and more common test cases which would make more sense |
| 35 | * to be run first. Therefore if this dependency is removed the execution |
| 36 | * order of these test classes should be reversed. */ |
| 37 | tfm_secure_client_run_tests(); |
| 38 | #endif |
| 39 | #ifdef TEST_FRAMEWORK_NS |
| 40 | tfm_non_secure_client_run_tests(); |
| 41 | #endif |
Paul Sokolovsky | 5d7925e | 2022-03-15 12:13:53 +0300 | [diff] [blame^] | 42 | /* Output EOT char for test environments like FVP. */ |
| 43 | LOG_MSG("\x04"); |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 44 | /* End of test */ |
| 45 | for (;;) { |
| 46 | } |
| 47 | } |
| 48 | #endif /* TEST_FRAMEWORK_NS OR TEST_FRAMEWORK_S */ |