utest: ipc: move from examples to components/drivers/ipc

Also:
- Add "RT_" prefix for utest config options.
- Rename the case names to following the naming rule.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
Chen Wang
2025-10-13 08:47:37 +08:00
committed by R b b666
parent 7499790140
commit d14daa6cb1
9 changed files with 22 additions and 31 deletions

View File

@@ -10,7 +10,6 @@ if RT_USING_UTESTCASES
rsource "components/utilities/utest/utest/Kconfig"
rsource "src/utest/Kconfig"
rsource "examples/utest/testcases/cpp11/Kconfig"
rsource "examples/utest/testcases/drivers/ipc/Kconfig"
rsource "examples/utest/testcases/posix/Kconfig"
rsource "examples/utest/testcases/mm/Kconfig"
rsource "examples/utest/testcases/tmpfs/Kconfig"
@@ -19,6 +18,7 @@ rsource "src/klibc/utest/Kconfig"
rsource "components/drivers/core/utest/Kconfig"
rsource "components/drivers/audio/utest/Kconfig"
rsource "components/drivers/ipc/utest/Kconfig"
rsource "components/drivers/serial/utest/Kconfig"
rsource "components/drivers/smp_call/utest/Kconfig"
rsource "components/dfs/utest/Kconfig"

View File

@@ -15,4 +15,9 @@ else:
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_DEVICE_IPC'], CPPPATH = CPPPATH, LOCAL_CPPDEFINES=['__RT_IPC_SOURCE__'])
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,12 @@
menu "IPC Unit Testcases"
depends on RT_USING_DEVICE_IPC
config RT_UTEST_COMPLETION
bool "rt_completion testcase"
default n
config RT_UTEST_WORKQUEUE
bool "rt_workqueue testcase"
default n
endmenu

View File

@@ -5,10 +5,10 @@ cwd = GetCurrentDir()
src = []
CPPPATH = [cwd]
if GetDepend(['UTEST_COMPLETION_TC']):
if GetDepend(['RT_UTEST_COMPLETION']):
src += ['completion_tc.c', 'completion_timeout_tc.c']
if GetDepend(['UTEST_WORKQUEUE_TC']):
if GetDepend(['RT_UTEST_WORKQUEUE']):
src += ['workqueue_tc.c']
group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES'], CPPPATH = CPPPATH)

View File

@@ -195,5 +195,5 @@ static rt_err_t utest_tc_cleanup(void)
return RT_EOK;
}
UTEST_TC_EXPORT(testcase, "testcases.drivers.ipc.rt_completion.basic",
UTEST_TC_EXPORT(testcase, "components.drivers.ipc.rt_completion_basic",
utest_tc_init, utest_tc_cleanup, 10);

View File

@@ -209,5 +209,5 @@ static rt_err_t utest_tc_cleanup(void)
return RT_EOK;
}
UTEST_TC_EXPORT(testcase, "testcases.drivers.ipc.rt_completion.timeout",
UTEST_TC_EXPORT(testcase, "components.drivers.ipc.rt_completion_timeout",
utest_tc_init, utest_tc_cleanup, 1000);

View File

@@ -1,15 +0,0 @@
# RT-Thread building script for bridge
import os
from building import *
cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
Return('objs')

View File

@@ -1,11 +0,0 @@
menu "Utest IPC Testcase"
config UTEST_COMPLETION_TC
bool "rt_completion testcase"
default n
config UTEST_WORKQUEUE_TC
bool "rt_workqueue testcase"
default n
endmenu