[utest] make RT_USING_CI_ACTION to be clear
RT_USING_CI_ACTION will select RT_UTEST_USING_AUTO_RUN and RT_UTEST_USING_ALL_CASES
This commit is contained in:
parent
53bd56ccf9
commit
bdd9447d70
@ -210,6 +210,19 @@ config RT_USING_UTEST
|
|||||||
config UTEST_THR_PRIORITY
|
config UTEST_THR_PRIORITY
|
||||||
int "The utest thread priority"
|
int "The utest thread priority"
|
||||||
default 20
|
default 20
|
||||||
|
|
||||||
|
config RT_UTEST_USING_AUTO_RUN
|
||||||
|
bool "Enable auto run test cases"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
If enable this option, the test cases will be run automatically when board boot up.
|
||||||
|
|
||||||
|
config RT_UTEST_USING_ALL_CASES
|
||||||
|
bool "Enable all selected modules' test cases"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
If enable this option, all selected modules' test cases will be run.
|
||||||
|
Otherwise, only the test cases that are explicitly enabled will be run.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config RT_USING_VAR_EXPORT
|
config RT_USING_VAR_EXPORT
|
||||||
|
@ -316,15 +316,15 @@ static void utest_thread_create(const char *utest_name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RT_USING_CI_ACTION
|
#ifdef RT_UTEST_USING_AUTO_RUN
|
||||||
static int utest_ci_action(void)
|
static int utest_auto_run(void)
|
||||||
{
|
{
|
||||||
tc_loop = 1;
|
tc_loop = 1;
|
||||||
utest_thread_create(RT_NULL);
|
utest_thread_create(RT_NULL);
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
INIT_APP_EXPORT(utest_ci_action);
|
INIT_APP_EXPORT(utest_auto_run);
|
||||||
#endif /* RT_USING_CI_ACTION */
|
#endif /* RT_UTEST_USING_AUTO_RUN */
|
||||||
|
|
||||||
int utest_testcase_run(int argc, char** argv)
|
int utest_testcase_run(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
@ -244,6 +244,8 @@ menuconfig RT_USING_DEBUG
|
|||||||
config RT_USING_CI_ACTION
|
config RT_USING_CI_ACTION
|
||||||
bool "Enable CI Action build mode"
|
bool "Enable CI Action build mode"
|
||||||
select RT_USING_UTEST
|
select RT_USING_UTEST
|
||||||
|
select RT_UTEST_USING_AUTO_RUN
|
||||||
|
select RT_UTEST_USING_ALL_CASES
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Identify that the environment is CI Action.
|
Identify that the environment is CI Action.
|
||||||
|
@ -2,7 +2,7 @@ from building import *
|
|||||||
|
|
||||||
src = []
|
src = []
|
||||||
|
|
||||||
if GetDepend('RT_USING_CI_ACTION') or GetDepend('RT_UTEST_TC_USING_KLIBC'):
|
if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('RT_UTEST_TC_USING_KLIBC'):
|
||||||
src += Glob('TC_*.c')
|
src += Glob('TC_*.c')
|
||||||
|
|
||||||
group = DefineGroup('utestcases', src, depend = [''])
|
group = DefineGroup('utestcases', src, depend = [''])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user