Build: Secure tests use SP raw log instead

Switch Secure tests log to TF-M SP raw log.
Decouple Secure tests log from NS raw log implementation.

Signed-off-by: David Hu <david.hu@arm.com>
Change-Id: I726fa8c777631b276f36643c50542233c50b00eb
diff --git a/test/framework/test_framework.h b/test/framework/test_framework.h
index fa27390..1378905 100644
--- a/test/framework/test_framework.h
+++ b/test/framework/test_framework.h
@@ -12,7 +12,7 @@
 #include <stdint.h>
 #include <stdio.h>
 
-#include "tfm_log_raw.h"
+#include "test_log.h"
 #include "test_framework_helpers.h"
 #include "test_framework_error_codes.h"
 
@@ -126,8 +126,6 @@
 
 #define TEST_FAIL(info_msg)  set_test_failed(info_msg, __FILE__, __LINE__, ret)
 
-#define TEST_LOG(...) tfm_log_printf(__VA_ARGS__)
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/test/framework/test_log.h b/test/framework/test_log.h
new file mode 100644
index 0000000..149afe2
--- /dev/null
+++ b/test/framework/test_log.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2021, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#ifndef __TEST_LOG_H__
+#define __TEST_LOG_H__
+
+#if DOMAIN_NS == 1
+#include "tfm_log_raw.h"
+#else
+#include "tfm_sp_log.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if DOMAIN_NS == 1
+#define TEST_LOG(...) tfm_log_printf(__VA_ARGS__)
+#else
+#define TEST_LOG(...) tfm_sp_log_printf(__VA_ARGS__)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TEST_LOG_H__ */