11 #define LOG_TAG "TEST_UNIT"
14 #define __MODULE__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
17 #define LOG_(prio, tag, fmt, arg...) ({ dlog_print(prio, tag, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg); })
19 #if (TEST_MODE == TEST_UNIT)
20 #define TEST_APP_LOG_TAG "TEST_APP"
21 #define TEST_UNIT_LOG_TAG "TEST_UNIT"
22 #define __D(format, arg...) LOG_(DLOG_DEBUG, LOG_TAG, format, ##arg)
23 #define __I(format, arg...) LOG_(DLOG_INFO, LOG_TAG, format, ##arg)
24 #define __E(format, arg...) LOG_(DLOG_ERROR, LOG_TAG, format, ##arg)
25 #define __T(format, arg...) ({ dlog_print(DLOG_DEBUG, TEST_APP_LOG_TAG, format, ##arg); unit_write_log(format, ##arg); })
26 #define __TU(format, arg...) LOG_(DLOG_DEBUG, TEST_UNIT_LOG_TAG, format, ##arg)
27 #elif (TEST_MODE == TEST_APP)
28 #define TEST_APP_LOG_TAG "TEST_APP"
29 #define __D(format, arg...) ({ dlog_print(DLOG_DEBUG, LOG_TAG, format, ##arg); unit_write_log(format, ##arg); })
30 #define __I(format, arg...) LOG_(DLOG_INFO, LOG_TAG, format, ##arg)
31 #define __E(format, arg...) LOG_(DLOG_ERROR, LOG_TAG, format, ##arg)
32 #define __T(format, arg...) LOG_(DLOG_DEBUG, TEST_APP_LOG_TAG, format, ##arg)
34 #define __D(format, arg...) LOG_(DLOG_DEBUG, LOG_TAG, format, ##arg)
35 #define __I(format, arg...) LOG_(DLOG_INFO, LOG_TAG, format, ##arg)
36 #define __E(format, arg...) LOG_(DLOG_ERROR, LOG_TAG, format, ##arg)