Test/App: Add the original test and app codes from tf-m
The version of the tf-m is:
ac9ccf207e153726b8dc1f5569f702f56d94297f
Change-Id: I445ada360540da55bbe74b3e7aa8d622e8fda501
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/app/tfm_integ_test.c b/app/tfm_integ_test.c
new file mode 100644
index 0000000..32cb674
--- /dev/null
+++ b/app/tfm_integ_test.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2017-2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#include "tfm_integ_test.h"
+
+#ifdef TEST_FRAMEWORK_NS
+#include "test/framework/test_framework_integ_test.h"
+#endif
+
+#ifdef TEST_FRAMEWORK_S
+#include \
+ "test/test_services/tfm_secure_client_service/tfm_secure_client_service_api.h"
+#endif
+
+#if defined(TEST_FRAMEWORK_NS) || defined(TEST_FRAMEWORK_S)
+/**
+ * \brief Services test thread
+ *
+ */
+__attribute__((noreturn))
+void test_app(void *argument)
+{
+ UNUSED_VARIABLE(argument);
+
+#ifdef TEST_FRAMEWORK_S
+ /* FIXME: The non-secure audit log test currently relies on the fact that
+ * the audit log secure test is run first. However the Non-secure tests
+ * represent simpler and more common test cases which would make more sense
+ * to be run first. Therefore if this dependency is removed the execution
+ * order of these test classes should be reversed. */
+ tfm_secure_client_run_tests();
+#endif
+#ifdef TEST_FRAMEWORK_NS
+ tfm_non_secure_client_run_tests();
+#endif
+ /* End of test */
+ for (;;) {
+ }
+}
+#endif /* TEST_FRAMEWORK_NS OR TEST_FRAMEWORK_S */