File tree Expand file tree Collapse file tree 4 files changed +20
-5
lines changed
Expand file tree Collapse file tree 4 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,19 @@ config RT_USING_UTEST
210210 config UTEST_THR_PRIORITY
211211 int "The utest thread priority"
212212 default 20
213+
214+ config RT_UTEST_USING_AUTO_RUN
215+ bool "Enable auto run test cases"
216+ default n
217+ help
218+ If enable this option, the test cases will be run automatically when board boot up.
219+
220+ config RT_UTEST_USING_ALL_CASES
221+ bool "Enable all selected modules' test cases"
222+ default n
223+ help
224+ If enable this option, all selected modules' test cases will be run.
225+ Otherwise, only the test cases that are explicitly enabled will be run.
213226 endif
214227
215228config RT_USING_VAR_EXPORT
Original file line number Diff line number Diff line change @@ -316,15 +316,15 @@ static void utest_thread_create(const char *utest_name)
316316 }
317317}
318318
319- #ifdef RT_USING_CI_ACTION
320- static int utest_ci_action (void )
319+ #ifdef RT_UTEST_USING_AUTO_RUN
320+ static int utest_auto_run (void )
321321{
322322 tc_loop = 1 ;
323323 utest_thread_create (RT_NULL );
324324 return RT_EOK ;
325325}
326- INIT_APP_EXPORT (utest_ci_action );
327- #endif /* RT_USING_CI_ACTION */
326+ INIT_APP_EXPORT (utest_auto_run );
327+ #endif /* RT_UTEST_USING_AUTO_RUN */
328328
329329int utest_testcase_run (int argc , char * * argv )
330330{
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ menuconfig RT_USING_DEBUG
244244config RT_USING_CI_ACTION
245245 bool "Enable CI Action build mode"
246246 select RT_USING_UTEST
247+ select RT_UTEST_USING_AUTO_RUN
248+ select RT_UTEST_USING_ALL_CASES
247249 default n
248250 help
249251 Identify that the environment is CI Action.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ from building import *
22
33src = []
44
5- if GetDepend ('RT_USING_CI_ACTION ' ) or GetDepend ('RT_UTEST_TC_USING_KLIBC' ):
5+ if GetDepend ('RT_UTEST_USING_ALL_CASES ' ) or GetDepend ('RT_UTEST_TC_USING_KLIBC' ):
66 src += Glob ('TC_*.c' )
77
88group = DefineGroup ('utestcases' , src , depend = ['' ])
You can’t perform that action at this time.
0 commit comments