Skip to content

Commit 3b97667

Browse files
unicornxRbb666
authored andcommitted
utest: serial: move from examples to components/drivers/serial
Signed-off-by: Chen Wang <[email protected]>
1 parent e72182d commit 3b97667

31 files changed

+32
-15
lines changed

Kconfig.utestcases

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ if RT_USING_UTESTCASES
1010
rsource "components/utilities/utest/utest/Kconfig"
1111
rsource "src/utest/Kconfig"
1212
rsource "examples/utest/testcases/cpp11/Kconfig"
13-
rsource "examples/utest/testcases/drivers/serial_v2/Kconfig"
14-
rsource "examples/utest/testcases/drivers/serial_bypass/Kconfig"
1513
rsource "examples/utest/testcases/drivers/ipc/Kconfig"
1614
rsource "examples/utest/testcases/posix/Kconfig"
1715
rsource "examples/utest/testcases/mm/Kconfig"
@@ -23,6 +21,8 @@ rsource "src/klibc/utest/Kconfig"
2321

2422
rsource "components/drivers/core/utest/Kconfig"
2523
rsource "components/drivers/audio/utest/Kconfig"
24+
rsource "components/drivers/serial/utest/Kconfig"
25+
2626
rsource "components/dfs/utest/Kconfig"
2727
rsource "components/net/utest/Kconfig"
2828

components/drivers/serial/SConscript

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ if GetDepend(['RT_USING_DM']):
2424

2525
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
2626

27+
list = os.listdir(cwd)
28+
for item in list:
29+
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
30+
group = group + SConscript(os.path.join(item, 'SConscript'))
31+
2732
Return('group')

examples/utest/testcases/drivers/serial_v2/Kconfig renamed to components/drivers/serial/utest/Kconfig

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
menu "Utest Serial Testcase"
1+
menu "Serial Unit Testcases"
2+
3+
config UTEST_SERIAL_BYPASS
4+
bool "Serial Bypass testcases"
5+
default n
6+
depends on RT_USING_SERIAL_BYPASS
27

38
config UTEST_SERIAL_TC
4-
bool "Serial testcase"
9+
bool "Serial V2 testcases"
510
default n
611
depends on RT_USING_SERIAL_V2
712

@@ -37,8 +42,8 @@ menu "Utest Serial Testcase"
3742
if UTEST_SERIAL_POSIX_TC
3843

3944
config RT_SERIAL_POSIX_TC_DEVICE_NAME
40-
string "the device name for serial posix test"
41-
default "dev/uart2"
45+
string "the device name for serial posix test"
46+
default "dev/uart2"
4247

4348
config RT_SERIAL_POSIX_TC_SEND_ITERATIONS
4449
int "the number of iterations for the posix test routine."
@@ -48,4 +53,4 @@ menu "Utest Serial Testcase"
4853

4954
endif
5055

51-
endmenu
56+
endmenu
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Import('rtconfig')
2+
from building import *
3+
4+
cwd = GetCurrentDir()
5+
src = []
6+
CPPPATH = [cwd]
7+
8+
group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES', 'RT_USING_SERIAL'], CPPPATH = CPPPATH)
9+
10+
list = os.listdir(cwd)
11+
for item in list:
12+
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
13+
group = group + SConscript(os.path.join(item, 'SConscript'))
14+
15+
Return('group')
File renamed without changes.

0 commit comments

Comments
 (0)