Test: Duplicate log interface between TF-M and tf-m-tests

SPM and Partitions will use different log api, so there will be no
shared log api under 'interface' folder in future. Duplicate log
interface here for NS usage. The log api is copied from TF-M v1.1.

Change-Id: I1209c57366ee32a1d2a1d4524d156dad7a110d1f
Signed-off-by: Summer Qin <summer.qin@arm.com>
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 969a941..02b3bc5 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -150,11 +150,12 @@
 	add_subdirectory(${TFM_ROOT_DIR}/lib/ext/qcbor ${CMAKE_CURRENT_BINARY_DIR}/qcbor)
 endif()
 
+set(TEST_SRC "${CMAKE_CURRENT_LIST_DIR}/../log/tfm_log_raw.c")
 if (TFM_BUILD_IN_SPE)
 	#Build the secure library. Even though secure tests files depend on
 	#tfm_qcbor, this is not expressed here as the tfm_attest library is expected
 	#to hold the compiled tfm_qcbor files.
-	add_library(tfm_secure_tests STATIC ${ALL_SRC_C} ${ALL_SRC_C_S})
+	add_library(tfm_secure_tests STATIC ${ALL_SRC_C} ${ALL_SRC_C_S} ${TEST_SRC})
 	if (ENABLE_ATTESTATION_SERVICE_TESTS)
 		target_sources(tfm_secure_tests PRIVATE $<TARGET_OBJECTS:tfm_t_cose_verify> $<TARGET_OBJECTS:tfm_qcbor_decode>)
 	endif()
@@ -182,7 +183,7 @@
 else ()
 	#Build the non-secure library
 	set(CMAKE_STATIC_LIBRARY_PREFIX_C "lib")
-	add_library(tfm_non_secure_tests STATIC ${ALL_SRC_C} ${ALL_SRC_C_NS})
+	add_library(tfm_non_secure_tests STATIC ${ALL_SRC_C} ${ALL_SRC_C_NS} ${TEST_SRC})
 
 	embedded_target_include_directories(TARGET tfm_non_secure_tests PATH ${CMSIS_DIR}/RTOS2/Include ABSOLUTE APPEND)