Skip to content

Commit eefae9b

Browse files
committed
[utest] fix utest cases failure because of missing dependency
1 parent 3b6b4ca commit eefae9b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

core/utest/SConscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ src = []
55
if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('RTDUINO_USING_UTEST'):
66
src += Glob('TC_*.c')
77
src += Glob('TC_*.cpp')
8-
if GetDepend('RTDUINO_UTEST_USING_HIL'):
8+
if not GetDepend('RTDUINO_UTEST_USING_HIL'):
99
SrcRemove(src, Glob('TC_HIL_*.c'))
1010
SrcRemove(src, Glob('TC_HIL_*.cpp'))
1111

core/utest/TC_dtostrf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,14 @@ TC_dtostrf_entry(width)
311311
/* Utest function to run all test cases */
312312
static void utest_do_tc(void)
313313
{
314+
#ifdef RT_KLIBC_USING_VSNPRINTF_STANDARD
314315
TC_dtostrf_run(basic);
316+
TC_dtostrf_run(round);
317+
TC_dtostrf_run(width);
315318
// TC_dtostrf_run(big);
316319
// TC_dtostrf_run(minmax);
317320
// TC_dtostrf_run(nans);
318-
TC_dtostrf_run(round);
319-
TC_dtostrf_run(width);
321+
#endif /* RT_KLIBC_USING_VSNPRINTF_STANDARD */
320322
}
321323

322324
UTEST_TC_EXPORT(utest_do_tc, "RTduino.core.dtostrf", RT_NULL, RT_NULL, 1000);

core/utest/TC_dtostrnf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ static void TC_dtostrnf(void)
131131
/* Utest function to run all test cases */
132132
static void utest_do_tc(void)
133133
{
134+
#ifdef RT_KLIBC_USING_VSNPRINTF_STANDARD
134135
UTEST_UNIT_RUN(TC_dtostrf);
135136
UTEST_UNIT_RUN(TC_dtostrnf);
137+
#endif /* RT_KLIBC_USING_VSNPRINTF_STANDARD */
136138
}
137139

138140
UTEST_TC_EXPORT(utest_do_tc, "RTduino.core.dtostrnf", RT_NULL, RT_NULL, 1000);

0 commit comments

Comments
 (0)