Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bsp/k230/drivers/utest/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from building import *

src = []

if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('BSP_UTEST_DRIVERS'):
if GetDepend('BSP_UTEST_DRIVERS'):
src += ['test_gpio.c']
src += ['test_gpio_irq.c']

Expand Down
2 changes: 1 addition & 1 deletion components/drivers/audio/utest/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cwd = GetCurrentDir()
src = []
CPPPATH = [cwd]

if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('RT_UTEST_USING_AUDIO_DRIVER'):
if GetDepend('RT_UTEST_USING_AUDIO_DRIVER'):
src += Glob('tc_*.c')

group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES', 'RT_USING_AUDIO'], CPPPATH = CPPPATH)
Expand Down
2 changes: 1 addition & 1 deletion components/net/utest/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cwd = GetCurrentDir()
src = []
CPPPATH = [cwd]

if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('RT_UTEST_TC_USING_LWIP') or GetDepend('RT_UTEST_TC_USING_NETDEV'):
if GetDepend('RT_UTEST_TC_USING_LWIP') or GetDepend('RT_UTEST_TC_USING_NETDEV'):

if GetDepend('RT_UTEST_TC_USING_LWIP'):
# Add lwIP test source if enabled
Expand Down
7 changes: 0 additions & 7 deletions components/utilities/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,6 @@ config RT_USING_UTEST
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

config RT_USING_VAR_EXPORT
Expand Down
2 changes: 1 addition & 1 deletion components/utilities/utest/utest/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from building import *

src = []

if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('UTEST_SELF_PASS_TC'):
if GetDepend('UTEST_SELF_PASS_TC'):
src += Glob('TC_*.c')

group = DefineGroup('utc_UTest', src, depend = [''])
Expand Down
2 changes: 1 addition & 1 deletion documentation/6.components/utest/utest.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ For each module, you can maintain unit testcases in a unified manner in the foll

- `Kconfig` file, which defining configuration options for the unit test cases of this module, the recommended option is named `RT_UTEST_TC_USING_XXXX`, XXXX is the global unique module name of this module.

- `SConscript` file, note that when adding src files, in addition to relying on `RT_UTEST_TC_USING_XXXX`, you must also rely on `RT_UTEST_USING_ALL_CASES`, the two dependencies are in an "or" relationship. The role of `RT_UTEST_USING_ALL_CASES` is that once this option is turned on, all unit-testcases will be enabled to avoid selecting one by one.
- `SConscript` file, when adding src files, you need to rely on `RT_UTEST_TC_USING_XXXX`.

After completing the above steps, rsource the path of the Kconfig file of utest of this module to the file `Kconfig.utestcases`.

Expand Down
2 changes: 1 addition & 1 deletion examples/utest/testcases/cpp11/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cwd = GetCurrentDir()
src = []
CPPPATH = [cwd]

if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('UTEST_CPP11_THREAD_TC'):
if GetDepend('UTEST_CPP11_THREAD_TC'):
src += Glob('tc_*.cpp')

group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES', 'RT_USING_CPLUSPLUS'], CPPPATH = CPPPATH)
Expand Down
1 change: 0 additions & 1 deletion src/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ config RT_USING_CI_ACTION
bool "Enable CI Action build mode"
select RT_USING_UTEST
select RT_UTEST_USING_AUTO_RUN
select RT_UTEST_USING_ALL_CASES
default n
help
Identify that the environment is CI Action.
Expand Down
2 changes: 1 addition & 1 deletion src/klibc/utest/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from building import *

src = []

if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('RT_UTEST_TC_USING_KLIBC'):
if GetDepend('RT_UTEST_TC_USING_KLIBC'):
src += Glob('TC_*.c')

group = DefineGroup('utestcases', src, depend = [''])
Expand Down
Loading