Test: Add USE_STDIO option for test logs
The clients like RPC test framework hosts may use the stdio provided by
toolchain.
This patch adds this config option for test log.
It also removes the unncessary inclusions of <stdio.h>.
They are partially for the log function and the rest for the <stddef.h>
which is included by stdio.h.
Change-Id: I79328d50b43e6c0b0d7ed55296c9973a90cb90e1
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/tests_reg/test/framework/test_log.h b/tests_reg/test/framework/test_log.h
index 1fc0b3d..995f726 100644
--- a/tests_reg/test/framework/test_log.h
+++ b/tests_reg/test/framework/test_log.h
@@ -10,6 +10,8 @@
#ifdef USE_SP_LOG
#include "tfm_sp_log.h"
+#elif defined USE_STDIO
+#include <stdio.h>
#else
#include "tfm_log_raw.h"
#endif /* USE_SP_LOG */
@@ -18,7 +20,7 @@
extern "C" {
#endif
-#ifdef USE_SP_LOG
+#if defined USE_SP_LOG || USE_STDIO
#define TEST_LOG(...) printf(__VA_ARGS__)
#else
#define TEST_LOG(...) tfm_log_printf(__VA_ARGS__)