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

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
Chen Wang
2025-10-10 14:56:32 +08:00
committed by R b b666
parent e72182d7f4
commit 3b97667323
31 changed files with 32 additions and 15 deletions

View File

@@ -10,8 +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/serial_v2/Kconfig"
rsource "examples/utest/testcases/drivers/serial_bypass/Kconfig"
rsource "examples/utest/testcases/drivers/ipc/Kconfig"
rsource "examples/utest/testcases/posix/Kconfig"
rsource "examples/utest/testcases/mm/Kconfig"
@@ -23,6 +21,8 @@ rsource "src/klibc/utest/Kconfig"
rsource "components/drivers/core/utest/Kconfig"
rsource "components/drivers/audio/utest/Kconfig"
rsource "components/drivers/serial/utest/Kconfig"
rsource "components/dfs/utest/Kconfig"
rsource "components/net/utest/Kconfig"

View File

@@ -24,4 +24,9 @@ if GetDepend(['RT_USING_DM']):
group = DefineGroup('DeviceDrivers', src, depend = [''], 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

@@ -1,7 +1,12 @@
menu "Utest Serial Testcase"
menu "Serial Unit Testcases"
config UTEST_SERIAL_BYPASS
bool "Serial Bypass testcases"
default n
depends on RT_USING_SERIAL_BYPASS
config UTEST_SERIAL_TC
bool "Serial testcase"
bool "Serial V2 testcases"
default n
depends on RT_USING_SERIAL_V2

View File

@@ -0,0 +1,15 @@
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
src = []
CPPPATH = [cwd]
group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES', 'RT_USING_SERIAL'], 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

@@ -1,8 +0,0 @@
menu "Serial-Bypass Testcase"
config UTEST_SERIAL_BYPASS
bool "Serial testcase"
default n
depends on RT_USING_SERIAL_BYPASS
endmenu