mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-14 11:39:39 +08:00
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:
@@ -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"
|
||||
|
@@ -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')
|
||||
|
12
components/drivers/ipc/utest/Kconfig
Normal file
12
components/drivers/ipc/utest/Kconfig
Normal 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
|
@@ -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)
|
@@ -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);
|
@@ -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);
|
@@ -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')
|
@@ -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
|
Reference in New Issue
Block a user