From 7953cdfae3ce15ccb834883e52624e1b801e4958 Mon Sep 17 00:00:00 2001 From: liruncong Date: Sat, 14 Sep 2019 22:44:44 +0800 Subject: [PATCH] =?UTF-8?q?[components/utilities/utest]=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E6=97=A0=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E6=97=B6,?= =?UTF-8?q?=E6=89=A7=E8=A1=8Cutest=5Frun=E6=97=B6=E8=B7=91=E9=A3=9E?= =?UTF-8?q?=E9=97=AE=E9=A2=98.=20utest=5Finit=E5=A2=9E=E5=8A=A0=5F=5FCLANG?= =?UTF-8?q?=5FARM=E7=BC=96=E8=AF=91=E5=BC=80=E5=85=B3=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/utilities/utest/utest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/utilities/utest/utest.c b/components/utilities/utest/utest.c index f59f97bb64..6500ae2fbe 100644 --- a/components/utilities/utest/utest.c +++ b/components/utilities/utest/utest.c @@ -63,20 +63,20 @@ void utest_log_lv_set(rt_uint8_t lv) int utest_init(void) { /* initialize the utest commands table.*/ -#if defined(__CC_ARM) /* ARM C Compiler */ +#if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM C Compiler */ extern const int UtestTcTab$$Base; extern const int UtestTcTab$$Limit; tc_table = (utest_tc_export_t)&UtestTcTab$$Base; tc_num = (utest_tc_export_t)&UtestTcTab$$Limit - tc_table; -#elif defined (__ICCARM__) || defined(__ICCRX__) /* for IAR Compiler */ +#elif defined (__ICCARM__) || defined(__ICCRX__) /* for IAR Compiler */ tc_table = (utest_tc_export_t)__section_begin("UtestTcTab"); tc_num = (utest_tc_export_t)__section_end("UtestTcTab") - tc_table; -#elif defined (__GNUC__) /* for GCC Compiler */ +#elif defined (__GNUC__) /* for GCC Compiler */ extern const int __rt_utest_tc_tab_start; extern const int __rt_utest_tc_tab_end; tc_table = (utest_tc_export_t)&__rt_utest_tc_tab_start; tc_num = (utest_tc_export_t) &__rt_utest_tc_tab_end - tc_table; -#endif /* defined(__CC_ARM) */ +#endif LOG_I("utest is initialize success."); LOG_I("total utest testcase num: (%d)", tc_num); @@ -215,7 +215,7 @@ static void utest_run(const char *utest_name) i++; } - if (i == tc_num && is_find == RT_FALSE) + if (i == tc_num && is_find == RT_FALSE && utest_name != RT_NULL) { LOG_I("[==========] [ utest ] Not find (%s)", utest_name); LOG_I("[==========] [ utest ] finished");