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/log/CMakeLists.txt b/log/CMakeLists.txt
index ab6e179..1993428 100644
--- a/log/CMakeLists.txt
+++ b/log/CMakeLists.txt
@@ -32,22 +32,3 @@
     PRIVATE
         platform_ns
 )
-
-################################ S Log #########################################
-add_library(tfm_s_log STATIC EXCLUDE_FROM_ALL)
-
-target_sources(tfm_s_log
-    PRIVATE
-        ${CMAKE_SOURCE_DIR}/interface/src/log/tfm_log_raw.c
-)
-
-target_include_directories(tfm_s_log
-    PUBLIC
-        ${CMAKE_SOURCE_DIR}/interface/include/
-        ${CMAKE_SOURCE_DIR}/interface/include/log
-)
-
-target_link_libraries(tfm_s_log
-    PRIVATE
-        platform_s
-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b02deff..aa57ac9 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -65,6 +65,11 @@
         framework
 )
 
+target_compile_definitions(tfm_test_framework_ns
+    INTERFACE
+        DOMAIN_NS=1
+)
+
 target_link_libraries(tfm_test_framework_ns
     INTERFACE
         tfm_test_framework_common
@@ -97,7 +102,7 @@
     INTERFACE
         psa_interface
         tfm_test_framework_common
-        tfm_s_log
+        tfm_sp_log_raw
 )
 
 if (TEST_FRAMEWORK_S)
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__ */
diff --git a/test/suites/platform/CMakeLists.txt b/test/suites/platform/CMakeLists.txt
index c82583a..51cd750 100644
--- a/test/suites/platform/CMakeLists.txt
+++ b/test/suites/platform/CMakeLists.txt
@@ -71,7 +71,6 @@
             tfm_test_framework_s
             tfm_secure_api
             platform_s
-            tfm_sprt
     )
 
     target_link_libraries(tfm_s_tests