utest: move driver related case under to drivers
Some checks failed
ToolsCI / Tools (push) Has been cancelled
AutoTestCI / components/cpp11 (push) Has been cancelled
AutoTestCI / kernel/atomic (push) Has been cancelled
AutoTestCI / kernel/atomic/riscv64 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11/riscv64 (push) Has been cancelled
AutoTestCI / kernel/device (push) Has been cancelled
AutoTestCI / kernel/ipc (push) Has been cancelled
AutoTestCI / kernel/irq (push) Has been cancelled
AutoTestCI / kernel/mem (push) Has been cancelled
AutoTestCI / kernel/mem/riscv64 (push) Has been cancelled
AutoTestCI / kernel/thread (push) Has been cancelled
AutoTestCI / kernel/timer (push) Has been cancelled
AutoTestCI / rtsmart/aarch64 (push) Has been cancelled
AutoTestCI / rtsmart/arm (push) Has been cancelled
AutoTestCI / rtsmart/riscv64 (push) Has been cancelled
AutoTestCI / components/utest (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :dfs/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/object.cfg (push) Has been cancelled
utest_auto_run / A9 :lwip/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :netdev/netdev.cfg (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled

src/utest/device_tc.c is testing API: rt_device_find(),
which is a function defined in components/drivers/core/device.c.
So it should be a testcase for drivers core, not for core.

Move it to under components/drivers/core.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
Chen Wang
2025-09-26 14:21:02 +08:00
committed by R b b666
parent 7b8e8c95ba
commit 01e015450f
7 changed files with 23 additions and 8 deletions

View File

@@ -21,6 +21,7 @@ rsource "examples/utest/testcases/perf/Kconfig"
rsource "src/klibc/utest/Kconfig"
rsource "components/drivers/core/utest/Kconfig"
rsource "components/drivers/audio/utest/Kconfig"
rsource "components/dfs/utest/Kconfig"
rsource "components/net/utest/Kconfig"

View File

@@ -18,4 +18,9 @@ if GetDepend(['RT_USING_OFW']):
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_DEVICE'], CPPPATH = CPPPATH)
list = os.listdir(cwd)
for item in list:
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
group = group + SConscript(os.path.join(item, 'SConscript'))
Return('group')

View File

@@ -0,0 +1,3 @@
config RT_UTEST_DRIVERS_CORE
bool "Enable testcase for drivers core"
default n

View File

@@ -0,0 +1,13 @@
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
src = []
CPPPATH = [cwd]
if GetDepend('RT_UTEST_DRIVERS_CORE'):
src += Glob('*.c')
group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES'], CPPPATH = CPPPATH)
Return('group')

View File

@@ -56,4 +56,4 @@ static void testcase(void)
{
UTEST_UNIT_RUN(test_rt_device_find);
}
UTEST_TC_EXPORT(testcase, "core.device_find", utest_tc_init, utest_tc_cleanup, 5);
UTEST_TC_EXPORT(testcase, "components.drivers.core.device_find", utest_tc_init, utest_tc_cleanup, 5);

View File

@@ -62,10 +62,6 @@ config UTEST_THREAD_TC
select RT_USING_TIMER_SOFT
select RT_USING_THREAD
config UTEST_DEVICE_TC
bool "device test"
default n
config UTEST_ATOMIC_TC
bool "atomic test"
default n

View File

@@ -46,9 +46,6 @@ if GetDepend(['UTEST_THREAD_TC']):
src += ['thread_overflow_tc.c']
src += ['thread_suspend_tc.c']
if GetDepend(['UTEST_DEVICE_TC']):
src += ['device_tc.c']
if GetDepend(['UTEST_ATOMIC_TC']):
src += ['atomic_tc.c']