Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Kconfig.utestcases
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down
5 changes: 5 additions & 0 deletions components/drivers/serial/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -37,8 +42,8 @@ menu "Utest Serial Testcase"
if UTEST_SERIAL_POSIX_TC

config RT_SERIAL_POSIX_TC_DEVICE_NAME
string "the device name for serial posix test"
default "dev/uart2"
string "the device name for serial posix test"
default "dev/uart2"

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

endif

endmenu
endmenu
15 changes: 15 additions & 0 deletions components/drivers/serial/utest/SConscript
Original file line number Diff line number Diff line change
@@ -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')
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ static void _testcase(void)
UTEST_UNIT_RUN(bypass_rx_stress_003);
}

UTEST_TC_EXPORT(_testcase, "testcase.bypass.conflict.001", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(_testcase, "components.drivers.serial.bypass_rx_stress", utest_tc_init, utest_tc_cleanup, 10);
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ static void _testcase(void)
UTEST_UNIT_RUN(bypass_lower_002);
}

UTEST_TC_EXPORT(_testcase, "testcase.bypass.lower.001", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(_testcase, "components.drivers.serial.bypass_lower", utest_tc_init, utest_tc_cleanup, 10);
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ static void _testcase(void)
UTEST_UNIT_RUN(bypass_register_002);
}

UTEST_TC_EXPORT(_testcase, "testcase.bypass.register.001", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(_testcase, "components.drivers.serial.bypass_register", utest_tc_init, utest_tc_cleanup, 10);
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ static void _testcase(void)
UTEST_UNIT_RUN(bypass_upper_002);
}

UTEST_TC_EXPORT(_testcase, "testcase.bypass.upper.001", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(_testcase, "components.drivers.serial.bypass_upper", utest_tc_init, utest_tc_cleanup, 10);
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_posix_echo_block", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_posix_echo_block", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_posix_nonblock", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_posix_nonblock", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,6 @@ static void testcase(void)
{
UTEST_UNIT_RUN(uart_test_nonblocking_tx);
}
UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_qemu_echo", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_qemu_echo", utest_tc_init, utest_tc_cleanup, 10);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ static void testcase(void)
{
UTEST_UNIT_RUN(uart_test_blocking_rx);
}
UTEST_TC_EXPORT(testcase, "uart_blocking_rx", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_blocking_rx", utest_tc_init, utest_tc_cleanup, 10);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ static void testcase(void)
{
UTEST_UNIT_RUN(uart_test_blocking_tx);
}
UTEST_TC_EXPORT(testcase, "uart_blocking_tx", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_blocking_tx", utest_tc_init, utest_tc_cleanup, 10);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_flush_rx", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_flush_rx", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_flush_txb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_flush_txb", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_flush_txnb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_flush_txnb", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_get_unread_bytes_count", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_get_unread_bytes_count", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ static void testcase(void)
{
UTEST_UNIT_RUN(uart_test_nonblocking_rx);
}
UTEST_TC_EXPORT(testcase, "uart_nonblocking_rx", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_nonblocking_rx", utest_tc_init, utest_tc_cleanup, 10);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,6 @@ static void testcase(void)
{
UTEST_UNIT_RUN(uart_test_nonblocking_tx);
}
UTEST_TC_EXPORT(testcase, "uart_nonblocking_tx", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_nonblocking_tx", utest_tc_init, utest_tc_cleanup, 10);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_overflow_rxb_txb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_overflow_rxb_txb", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_rxb_txb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_rxb_txb", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_rxb_txnb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_rxb_txnb", utest_tc_init, utest_tc_cleanup, 30);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_rxnb_txb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_rxnb_txb", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_rxnb_txnb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_rxnb_txnb", utest_tc_init, utest_tc_cleanup, 30);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_timeout_rxb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_timeout_rxb", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,6 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_timeout_rxb_txb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_timeout_rxb_txb", utest_tc_init, utest_tc_cleanup, 30);

#endif /* TC_UART_USING_TC */
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static void testcase(void)
UTEST_UNIT_RUN(tc_uart_api);
}

UTEST_TC_EXPORT(testcase, "testcases.drivers.uart_timeout_txb", utest_tc_init, utest_tc_cleanup, 30);
UTEST_TC_EXPORT(testcase, "components.drivers.serial.v2.uart_timeout_txb", utest_tc_init, utest_tc_cleanup, 30);

#endif /* BSP_UART2_TX_USING_DMA */
#endif /* TC_UART_USING_TC */
8 changes: 0 additions & 8 deletions examples/utest/testcases/drivers/serial_bypass/Kconfig

This file was deleted.