diff --git a/test/cmocka/src/common_mocks.c b/test/cmocka/src/common_mocks.c index 59ed9fce4..e362f4b95 100644 --- a/test/cmocka/src/common_mocks.c +++ b/test/cmocka/src/common_mocks.c @@ -100,6 +100,7 @@ void WEAK __panic(uint32_t p, char *filename, uint32_t linenum) exit(EXIT_FAILURE); } +#if CONFIG_TRACE void WEAK trace_log_filtered(bool send_atomic, const void *log_entry, const struct tr_ctx *ctx, uint32_t lvl, uint32_t id_1, uint32_t id_2, int arg_count, ...) { @@ -115,6 +116,7 @@ void WEAK trace_log_filtered(bool send_atomic, const void *log_entry, const stru void WEAK trace_flush_dma_to_mbox(void) { } +#endif #if CONFIG_LIBRARY volatile void *task_context_get(void); @@ -330,6 +332,8 @@ int WEAK arch_cpu_is_core_enabled(int id) int WEAK test_bench_trace = 1; int WEAK debug; +/* ... but not always in unit tests */ +#if CONFIG_TRACE /* look up subsystem class name from table */ char * WEAK get_trace_class(uint32_t trace_class) { @@ -339,6 +343,7 @@ char * WEAK get_trace_class(uint32_t trace_class) */ return "unknown"; } +#endif uint8_t * WEAK get_library_mailbox(void) {