blob: 0430837ffaf62cb35bc78bddc168ab856bdf8307 [file] [log] [blame]
Kevin Peng62a87112020-07-07 15:07:46 +08001/*
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 Sokolovsky5d7925e2022-03-15 12:13:53 +03009#include "tfm_log.h"
Kevin Peng62a87112020-07-07 15:07:46 +080010
11#ifdef TEST_FRAMEWORK_NS
Raef Coles5ee45ed2020-09-24 11:25:44 +010012#include "test_framework_integ_test.h"
Kevin Peng62a87112020-07-07 15:07:46 +080013#endif
14
shejia0126b2d782021-08-19 17:08:24 +080015#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 Coles5ee45ed2020-09-24 11:25:44 +010018#include "tfm_secure_client_service_api.h"
Kevin Peng62a87112020-07-07 15:07:46 +080019#endif
20
21#if defined(TEST_FRAMEWORK_NS) || defined(TEST_FRAMEWORK_S)
22/**
23 * \brief Services test thread
24 *
25 */
26__attribute__((noreturn))
27void test_app(void *argument)
28{
29 UNUSED_VARIABLE(argument);
30
shejia0126b2d782021-08-19 17:08:24 +080031#if defined(TEST_FRAMEWORK_S) && defined(TFM_LIB_MODEL)
Kevin Peng62a87112020-07-07 15:07:46 +080032 /* 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 Sokolovsky5d7925e2022-03-15 12:13:53 +030042 /* Output EOT char for test environments like FVP. */
43 LOG_MSG("\x04");
Kevin Peng62a87112020-07-07 15:07:46 +080044 /* End of test */
45 for (;;) {
46 }
47}
48#endif /* TEST_FRAMEWORK_NS OR TEST_FRAMEWORK_S */