diff --git a/bsp/nuvoton/ma35-rtp/.config b/bsp/nuvoton/ma35-rtp/.config index 1fceb8040e5..c3b0ef3c342 100644 --- a/bsp/nuvoton/ma35-rtp/.config +++ b/bsp/nuvoton/ma35-rtp/.config @@ -400,13 +400,13 @@ CONFIG_RT_USING_UTESTCASES=y # # Utest Self Testcase # -CONFIG_UTEST_SELF_PASS_TC=y +CONFIG_RT_UTEST_SELF_PASS=y # end of Utest Self Testcase # # Kernel Testcase # -CONFIG_UTEST_SMALL_MEM_TC=y +CONFIG_RT_UTEST_SMALL_MEM=y # CONFIG_UTEST_IRQ_TC is not set # CONFIG_UTEST_SEMAPHORE_TC is not set # CONFIG_UTEST_EVENT_TC is not set diff --git a/bsp/nuvoton/ma35-rtp/rtconfig.h b/bsp/nuvoton/ma35-rtp/rtconfig.h index b8579830eae..9bab82a5e24 100644 --- a/bsp/nuvoton/ma35-rtp/rtconfig.h +++ b/bsp/nuvoton/ma35-rtp/rtconfig.h @@ -217,12 +217,12 @@ /* Utest Self Testcase */ -#define UTEST_SELF_PASS_TC +#define RT_UTEST_SELF_PASS /* end of Utest Self Testcase */ /* Kernel Testcase */ -#define UTEST_SMALL_MEM_TC +#define RT_UTEST_SMALL_MEM /* end of Kernel Testcase */ /* CPP11 Testcase */ diff --git a/bsp/nuvoton/numaker-hmi-ma35d1/.config b/bsp/nuvoton/numaker-hmi-ma35d1/.config index 13cb9644602..a68e42fd24d 100644 --- a/bsp/nuvoton/numaker-hmi-ma35d1/.config +++ b/bsp/nuvoton/numaker-hmi-ma35d1/.config @@ -605,14 +605,14 @@ CONFIG_RT_USING_UTESTCASES=y # # Utest Self Testcase # -CONFIG_UTEST_SELF_PASS_TC=y +CONFIG_RT_UTEST_SELF_PASS=y # end of Utest Self Testcase # # Kernel Testcase # -CONFIG_UTEST_MEMHEAP_TC=y -CONFIG_UTEST_SMALL_MEM_TC=y +CONFIG_RT_UTEST_MEMHEAP=y +CONFIG_RT_UTEST_SMALL_MEM=y # CONFIG_UTEST_IRQ_TC is not set # CONFIG_UTEST_SEMAPHORE_TC is not set # CONFIG_UTEST_EVENT_TC is not set diff --git a/bsp/nuvoton/numaker-hmi-ma35d1/rtconfig.h b/bsp/nuvoton/numaker-hmi-ma35d1/rtconfig.h index b6e6c437c25..36a552f6bf0 100644 --- a/bsp/nuvoton/numaker-hmi-ma35d1/rtconfig.h +++ b/bsp/nuvoton/numaker-hmi-ma35d1/rtconfig.h @@ -378,13 +378,13 @@ /* Utest Self Testcase */ -#define UTEST_SELF_PASS_TC +#define RT_UTEST_SELF_PASS /* end of Utest Self Testcase */ /* Kernel Testcase */ -#define UTEST_MEMHEAP_TC -#define UTEST_SMALL_MEM_TC +#define RT_UTEST_MEMHEAP +#define RT_UTEST_SMALL_MEM /* end of Kernel Testcase */ /* CPP11 Testcase */ diff --git a/bsp/nuvoton/numaker-iot-ma35d1/.config b/bsp/nuvoton/numaker-iot-ma35d1/.config index 5627caf4299..0d953f5315a 100644 --- a/bsp/nuvoton/numaker-iot-ma35d1/.config +++ b/bsp/nuvoton/numaker-iot-ma35d1/.config @@ -606,14 +606,14 @@ CONFIG_RT_USING_UTESTCASES=y # # Utest Self Testcase # -CONFIG_UTEST_SELF_PASS_TC=y +CONFIG_RT_UTEST_SELF_PASS=y # end of Utest Self Testcase # # Kernel Testcase # -CONFIG_UTEST_MEMHEAP_TC=y -CONFIG_UTEST_SMALL_MEM_TC=y +CONFIG_RT_UTEST_MEMHEAP=y +CONFIG_RT_UTEST_SMALL_MEM=y # CONFIG_UTEST_IRQ_TC is not set # CONFIG_UTEST_SEMAPHORE_TC is not set # CONFIG_UTEST_EVENT_TC is not set diff --git a/bsp/nuvoton/numaker-iot-ma35d1/rtconfig.h b/bsp/nuvoton/numaker-iot-ma35d1/rtconfig.h index b9b506fc159..c9c2b518fe2 100644 --- a/bsp/nuvoton/numaker-iot-ma35d1/rtconfig.h +++ b/bsp/nuvoton/numaker-iot-ma35d1/rtconfig.h @@ -379,13 +379,13 @@ /* Utest Self Testcase */ -#define UTEST_SELF_PASS_TC +#define RT_UTEST_SELF_PASS /* end of Utest Self Testcase */ /* Kernel Testcase */ -#define UTEST_MEMHEAP_TC -#define UTEST_SMALL_MEM_TC +#define RT_UTEST_MEMHEAP +#define RT_UTEST_SMALL_MEM /* end of Kernel Testcase */ /* CPP11 Testcase */ diff --git a/bsp/nuvoton/numaker-m032ki/.config b/bsp/nuvoton/numaker-m032ki/.config index 805600783d7..b0c9563407d 100644 --- a/bsp/nuvoton/numaker-m032ki/.config +++ b/bsp/nuvoton/numaker-m032ki/.config @@ -407,13 +407,13 @@ CONFIG_RT_USING_UTESTCASES=y # # Utest Self Testcase # -CONFIG_UTEST_SELF_PASS_TC=y +CONFIG_RT_UTEST_SELF_PASS=y # end of Utest Self Testcase # # Kernel Testcase # -CONFIG_UTEST_SMALL_MEM_TC=y +CONFIG_RT_UTEST_SMALL_MEM=y # CONFIG_UTEST_IRQ_TC is not set # CONFIG_UTEST_SEMAPHORE_TC is not set # CONFIG_UTEST_EVENT_TC is not set diff --git a/bsp/nuvoton/numaker-m032ki/config_lvgl b/bsp/nuvoton/numaker-m032ki/config_lvgl index cb26c150347..36d4d68edb9 100644 --- a/bsp/nuvoton/numaker-m032ki/config_lvgl +++ b/bsp/nuvoton/numaker-m032ki/config_lvgl @@ -234,12 +234,12 @@ CONFIG_RT_USING_UTESTCASES=y # # Utest Self Testcase # -CONFIG_UTEST_SELF_PASS_TC=y +CONFIG_RT_UTEST_SELF_PASS=y # # Kernel Testcase # -CONFIG_UTEST_SMALL_MEM_TC=y +CONFIG_RT_UTEST_SMALL_MEM=y # CONFIG_UTEST_IRQ_TC is not set # CONFIG_UTEST_SEMAPHORE_TC is not set # CONFIG_UTEST_EVENT_TC is not set diff --git a/bsp/nuvoton/numaker-m032ki/rtconfig.h b/bsp/nuvoton/numaker-m032ki/rtconfig.h index 5a488e3e941..3d5d276ded9 100644 --- a/bsp/nuvoton/numaker-m032ki/rtconfig.h +++ b/bsp/nuvoton/numaker-m032ki/rtconfig.h @@ -223,12 +223,12 @@ /* Utest Self Testcase */ -#define UTEST_SELF_PASS_TC +#define RT_UTEST_SELF_PASS /* end of Utest Self Testcase */ /* Kernel Testcase */ -#define UTEST_SMALL_MEM_TC +#define RT_UTEST_SMALL_MEM /* end of Kernel Testcase */ /* CPP11 Testcase */ diff --git a/bsp/raspberry-pi/raspi-dm2.0/.config b/bsp/raspberry-pi/raspi-dm2.0/.config index a6e97b7c45c..98dcaa7434e 100644 --- a/bsp/raspberry-pi/raspi-dm2.0/.config +++ b/bsp/raspberry-pi/raspi-dm2.0/.config @@ -654,7 +654,7 @@ CONFIG_RT_USING_UTESTCASES=y # CONFIG_UTEST_ATOMIC_TC is not set # CONFIG_UTEST_HOOKLIST_TC is not set # CONFIG_UTEST_MTSAFE_KPRINT_TC is not set -CONFIG_UTEST_SCHEDULER_TC=y +CONFIG_RT_UTEST_SCHEDULER=y # # Kernel SMP Testcase diff --git a/bsp/raspberry-pi/raspi-dm2.0/rtconfig.h b/bsp/raspberry-pi/raspi-dm2.0/rtconfig.h index c67eea6cf79..f98fba483d4 100644 --- a/bsp/raspberry-pi/raspi-dm2.0/rtconfig.h +++ b/bsp/raspberry-pi/raspi-dm2.0/rtconfig.h @@ -417,7 +417,7 @@ /* Kernel Testcase */ -#define UTEST_SCHEDULER_TC +#define RT_UTEST_SCHEDULER /* Kernel SMP Testcase */ diff --git a/components/drivers/serial/utest/Kconfig b/components/drivers/serial/utest/Kconfig index cc6413374ff..31d1784fa2c 100644 --- a/components/drivers/serial/utest/Kconfig +++ b/components/drivers/serial/utest/Kconfig @@ -1,16 +1,16 @@ menu "Serial Unit Testcases" - config UTEST_SERIAL_BYPASS + config RT_UTEST_SERIAL_BYPASS bool "Serial Bypass testcases" default n depends on RT_USING_SERIAL_BYPASS - config UTEST_SERIAL_TC + config RT_UTEST_SERIAL_V2 bool "Serial V2 testcases" default n depends on RT_USING_SERIAL_V2 - if UTEST_SERIAL_TC + if RT_UTEST_SERIAL_V2 config RT_SERIAL_TC_DEVICE_NAME string "the device name for serial test" @@ -28,18 +28,18 @@ menu "Serial Unit Testcases" int "the number of iterations for the test routine." default 100 - config UTEST_SERIAL_QEMU_TC + config RT_UTEST_SERIAL_QEMU bool "qemu dedicated tests" default n - config UTEST_SERIAL_POSIX_TC + config RT_UTEST_SERIAL_POSIX bool "Serial posix testcase" default n select RT_USING_DFS select RT_USING_POSIX_FS select RT_USING_POSIX_TERMIOS - if UTEST_SERIAL_POSIX_TC + if RT_UTEST_SERIAL_POSIX config RT_SERIAL_POSIX_TC_DEVICE_NAME string "the device name for serial posix test" diff --git a/components/drivers/serial/utest/bypass/SConscript b/components/drivers/serial/utest/bypass/SConscript index 86be64011bf..2939d3c165d 100644 --- a/components/drivers/serial/utest/bypass/SConscript +++ b/components/drivers/serial/utest/bypass/SConscript @@ -6,6 +6,6 @@ src = Glob('bypass*.c') CPPPATH = [cwd] -group = DefineGroup('utestcases', src, depend = ['UTEST_SERIAL_BYPASS'], CPPPATH = CPPPATH) +group = DefineGroup('utestcases', src, depend = ['RT_UTEST_SERIAL_BYPASS'], CPPPATH = CPPPATH) Return('group') diff --git a/components/drivers/serial/utest/v2/SConscript b/components/drivers/serial/utest/v2/SConscript index 7ef99d20b7d..487fff585de 100644 --- a/components/drivers/serial/utest/v2/SConscript +++ b/components/drivers/serial/utest/v2/SConscript @@ -6,13 +6,13 @@ src = Glob('*.c') path = [cwd] -if GetDepend(['UTEST_SERIAL_POSIX_TC']): +if GetDepend(['RT_UTEST_SERIAL_POSIX']): src += Glob('posix/*.c') -if GetDepend(['UTEST_SERIAL_QEMU_TC']): +if GetDepend(['RT_UTEST_SERIAL_QEMU']): src += Glob('qemu/*.c') -group = DefineGroup('utestcases', src, depend = ['UTEST_SERIAL_TC'], CPPPATH = path) +group = DefineGroup('utestcases', src, depend = ['RT_UTEST_SERIAL_V2'], CPPPATH = path) Return('group') diff --git a/components/drivers/serial/utest/v2/posix/uart_posix_echo_block.c b/components/drivers/serial/utest/v2/posix/uart_posix_echo_block.c index 20eb076a88f..b0c1045cb7c 100644 --- a/components/drivers/serial/utest/v2/posix/uart_posix_echo_block.c +++ b/components/drivers/serial/utest/v2/posix/uart_posix_echo_block.c @@ -19,7 +19,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static int32_t serial_fd; static rt_uint8_t uart_over_flag; diff --git a/components/drivers/serial/utest/v2/posix/uart_posix_nonblock.c b/components/drivers/serial/utest/v2/posix/uart_posix_nonblock.c index c7556c51512..9fdc9ad4933 100644 --- a/components/drivers/serial/utest/v2/posix/uart_posix_nonblock.c +++ b/components/drivers/serial/utest/v2/posix/uart_posix_nonblock.c @@ -19,7 +19,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static int32_t serial_fd; diff --git a/components/drivers/serial/utest/v2/qemu/uart_qemu_echo.c b/components/drivers/serial/utest/v2/qemu/uart_qemu_echo.c index 70ec0f83ff0..7200a69ecda 100644 --- a/components/drivers/serial/utest/v2/qemu/uart_qemu_echo.c +++ b/components/drivers/serial/utest/v2/qemu/uart_qemu_echo.c @@ -6,7 +6,7 @@ #define UART_TEST_NUMBER 6 -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 #define echo_test_buffer_size (1024) static rt_device_t u1serial; diff --git a/components/drivers/serial/utest/v2/uart_blocking_rx.c b/components/drivers/serial/utest/v2/uart_blocking_rx.c index fc7899fb303..ad14c970dc2 100644 --- a/components/drivers/serial/utest/v2/uart_blocking_rx.c +++ b/components/drivers/serial/utest/v2/uart_blocking_rx.c @@ -2,7 +2,7 @@ #include #include "utest.h" -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static rt_bool_t block_read(rt_device_t uart_dev) { diff --git a/components/drivers/serial/utest/v2/uart_blocking_tx.c b/components/drivers/serial/utest/v2/uart_blocking_tx.c index b4d0dc404e7..ec0c79c352e 100644 --- a/components/drivers/serial/utest/v2/uart_blocking_tx.c +++ b/components/drivers/serial/utest/v2/uart_blocking_tx.c @@ -6,7 +6,7 @@ #define UART_TEST_NUMBER 6 -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static rt_bool_t block_write(rt_device_t uart_dev) { diff --git a/components/drivers/serial/utest/v2/uart_flush_rx.c b/components/drivers/serial/utest/v2/uart_flush_rx.c index 9902a305a9a..24af68353c6 100644 --- a/components/drivers/serial/utest/v2/uart_flush_rx.c +++ b/components/drivers/serial/utest/v2/uart_flush_rx.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; diff --git a/components/drivers/serial/utest/v2/uart_flush_txb.c b/components/drivers/serial/utest/v2/uart_flush_txb.c index 9d105eadb0a..3e99e77ecac 100644 --- a/components/drivers/serial/utest/v2/uart_flush_txb.c +++ b/components/drivers/serial/utest/v2/uart_flush_txb.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; diff --git a/components/drivers/serial/utest/v2/uart_flush_txnb.c b/components/drivers/serial/utest/v2/uart_flush_txnb.c index 1c97054754a..e300df286c8 100644 --- a/components/drivers/serial/utest/v2/uart_flush_txnb.c +++ b/components/drivers/serial/utest/v2/uart_flush_txnb.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; diff --git a/components/drivers/serial/utest/v2/uart_get_unread_bytes_count.c b/components/drivers/serial/utest/v2/uart_get_unread_bytes_count.c index 86f04f75712..40e2bfc918b 100644 --- a/components/drivers/serial/utest/v2/uart_get_unread_bytes_count.c +++ b/components/drivers/serial/utest/v2/uart_get_unread_bytes_count.c @@ -15,7 +15,7 @@ /* */ -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; static rt_uint8_t uart_over_flag = RT_FALSE; diff --git a/components/drivers/serial/utest/v2/uart_nonblocking_rx.c b/components/drivers/serial/utest/v2/uart_nonblocking_rx.c index 493863b0aaf..558b9493d27 100644 --- a/components/drivers/serial/utest/v2/uart_nonblocking_rx.c +++ b/components/drivers/serial/utest/v2/uart_nonblocking_rx.c @@ -2,7 +2,7 @@ #include #include "utest.h" -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static rt_bool_t nonblock_read(rt_device_t uart_dev) { diff --git a/components/drivers/serial/utest/v2/uart_nonblocking_tx.c b/components/drivers/serial/utest/v2/uart_nonblocking_tx.c index 0f5a293fcc2..3fe0fffd1b1 100644 --- a/components/drivers/serial/utest/v2/uart_nonblocking_tx.c +++ b/components/drivers/serial/utest/v2/uart_nonblocking_tx.c @@ -6,7 +6,7 @@ #define UART_TEST_NUMBER 6 -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static rt_bool_t nonblock_write(rt_device_t uart_dev) { diff --git a/components/drivers/serial/utest/v2/uart_overflow_rxb_txb.c b/components/drivers/serial/utest/v2/uart_overflow_rxb_txb.c index 229d03e7deb..6eb1ee27e91 100644 --- a/components/drivers/serial/utest/v2/uart_overflow_rxb_txb.c +++ b/components/drivers/serial/utest/v2/uart_overflow_rxb_txb.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; static rt_uint8_t uart_over_flag = RT_FALSE; diff --git a/components/drivers/serial/utest/v2/uart_rxb_txb.c b/components/drivers/serial/utest/v2/uart_rxb_txb.c index 59879abab8c..98b23228d90 100644 --- a/components/drivers/serial/utest/v2/uart_rxb_txb.c +++ b/components/drivers/serial/utest/v2/uart_rxb_txb.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; static rt_uint8_t uart_over_flag; diff --git a/components/drivers/serial/utest/v2/uart_rxb_txnb.c b/components/drivers/serial/utest/v2/uart_rxb_txnb.c index ff10be2f9d4..d5c723a1a24 100644 --- a/components/drivers/serial/utest/v2/uart_rxb_txnb.c +++ b/components/drivers/serial/utest/v2/uart_rxb_txnb.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; static rt_sem_t tx_sem; diff --git a/components/drivers/serial/utest/v2/uart_rxnb_txb.c b/components/drivers/serial/utest/v2/uart_rxnb_txb.c index 4e4e3f3dc45..5095273c7a7 100644 --- a/components/drivers/serial/utest/v2/uart_rxnb_txb.c +++ b/components/drivers/serial/utest/v2/uart_rxnb_txb.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; static rt_sem_t rx_sem; diff --git a/components/drivers/serial/utest/v2/uart_rxnb_txnb.c b/components/drivers/serial/utest/v2/uart_rxnb_txnb.c index 0a08be3b0e7..39168b3352c 100644 --- a/components/drivers/serial/utest/v2/uart_rxnb_txnb.c +++ b/components/drivers/serial/utest/v2/uart_rxnb_txnb.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; static rt_sem_t tx_sem; diff --git a/components/drivers/serial/utest/v2/uart_timeout_rxb.c b/components/drivers/serial/utest/v2/uart_timeout_rxb.c index c1dfceacd9c..18ece9107fb 100644 --- a/components/drivers/serial/utest/v2/uart_timeout_rxb.c +++ b/components/drivers/serial/utest/v2/uart_timeout_rxb.c @@ -14,7 +14,7 @@ #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; diff --git a/components/drivers/serial/utest/v2/uart_timeout_rxb_txb.c b/components/drivers/serial/utest/v2/uart_timeout_rxb_txb.c index 0f01abe9683..24a9f2f0c69 100644 --- a/components/drivers/serial/utest/v2/uart_timeout_rxb_txb.c +++ b/components/drivers/serial/utest/v2/uart_timeout_rxb_txb.c @@ -15,7 +15,7 @@ /* */ -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 static struct rt_serial_device *serial; static rt_bool_t uart_result = RT_TRUE; diff --git a/components/drivers/serial/utest/v2/uart_timeout_txb.c b/components/drivers/serial/utest/v2/uart_timeout_txb.c index c805f3f0272..d60e9bd02ca 100644 --- a/components/drivers/serial/utest/v2/uart_timeout_txb.c +++ b/components/drivers/serial/utest/v2/uart_timeout_txb.c @@ -13,7 +13,7 @@ #include #include -#ifdef UTEST_SERIAL_TC +#ifdef RT_UTEST_SERIAL_V2 #ifndef BSP_UART2_TX_USING_DMA static struct rt_serial_device *serial; diff --git a/components/mm/mm_memblock.c b/components/mm/mm_memblock.c index d3d4e44f641..3046c1caa92 100644 --- a/components/mm/mm_memblock.c +++ b/components/mm/mm_memblock.c @@ -397,7 +397,7 @@ void rt_memblock_setup_memory_environment(void) LOG_I("%ld MB memory installed to system page", mem/1000000); } -#ifdef UTEST_MM_API_TC +#ifdef RT_UTEST_MM_API /* functions below are only used for utest */ void rt_memblock_merge(void) { @@ -423,4 +423,4 @@ rt_bool_t rt_memblock_is_last_free(void) return mem == rt_slist_entry(&(mmblk_memory.reg_list), struct rt_mmblk_reg, node); } -#endif /* UTEST_MM_API_TC */ +#endif /* RT_UTEST_MM_API */ diff --git a/components/utilities/utest/utest/Kconfig b/components/utilities/utest/utest/Kconfig index 088f49d1b6c..890903ba3f5 100644 --- a/components/utilities/utest/utest/Kconfig +++ b/components/utilities/utest/utest/Kconfig @@ -1,6 +1,6 @@ menu "Utest Self Testcase" -config UTEST_SELF_PASS_TC +config RT_UTEST_SELF_PASS bool "UTEST Self-test" select RT_USING_UTEST default n diff --git a/components/utilities/utest/utest/SConscript b/components/utilities/utest/utest/SConscript index ec1e214de67..15b83ac3e50 100644 --- a/components/utilities/utest/utest/SConscript +++ b/components/utilities/utest/utest/SConscript @@ -2,7 +2,7 @@ from building import * src = [] -if GetDepend('UTEST_SELF_PASS_TC'): +if GetDepend('RT_UTEST_SELF_PASS'): src += Glob('TC_*.c') group = DefineGroup('utc_UTest', src, depend = ['']) diff --git a/documentation/6.components/utest/utest.md b/documentation/6.components/utest/utest.md index 713adfbb14d..81781e19ae9 100644 --- a/documentation/6.components/utest/utest.md +++ b/documentation/6.components/utest/utest.md @@ -312,9 +312,9 @@ For each module, you can maintain unit testcases in a unified manner in the foll - Unit-testcase program source code files for this module. - - `Kconfig` file, which defining configuration options for the unit test cases of this module, the recommended option is named `RT_UTEST_TC_USING_XXXX`, XXXX is the global unique module name of this module. + - `Kconfig` file, which defining configuration options for the unit test cases of this module, the recommended option is named `RT_UTEST_XXXX`, XXXX is the global unique module name of this module. - - `SConscript` file, when adding src files, you need to rely on `RT_UTEST_TC_USING_XXXX`. + - `SConscript` file, when adding src files, you need to rely on `RT_UTEST_XXXX`. After completing the above steps, rsource the path of the Kconfig file of utest of this module to the file `Kconfig.utestcases`. diff --git a/examples/utest/README.md b/examples/utest/README.md index 6e24632b7cb..04c3f910f17 100644 --- a/examples/utest/README.md +++ b/examples/utest/README.md @@ -57,7 +57,7 @@ msh />utest_run 1. 如果是对已有测试集合的完善,需要把添加的测试用例的配置项,以及对应的依赖项添加到对应测试集合的配置文件里,如:[examples\utest\configs\kernel\mem.conf](./configs/kernel/mem.conf)。 ``` -CONFIG_UTEST_MEMHEAP_TC=y +CONFIG_RT_UTEST_MEMHEAP=y # dependencies CONFIG_RT_USING_MEMHEAP=y diff --git a/examples/utest/configs/cpp11/cpp11.cfg b/examples/utest/configs/cpp11/cpp11.cfg index e30b317cdf7..4cf1338868b 100644 --- a/examples/utest/configs/cpp11/cpp11.cfg +++ b/examples/utest/configs/cpp11/cpp11.cfg @@ -1,4 +1,4 @@ -CONFIG_UTEST_CPP11_THREAD_TC=y +CONFIG_RT_UTEST_CPP11_THREAD=y # dependencies CONFIG_RT_USING_CI_ACTION=y CONFIG_RT_USING_CPLUSPLUS=y diff --git a/examples/utest/configs/default.cfg b/examples/utest/configs/default.cfg index cb59d0d01ed..ebc7b5fc41d 100644 --- a/examples/utest/configs/default.cfg +++ b/examples/utest/configs/default.cfg @@ -2,6 +2,6 @@ CONFIG_RT_CONSOLEBUF_SIZE=1024 CONFIG_RT_USING_CI_ACTION=y -CONFIG_UTEST_SELF_PASS_TC=y -CONFIG_UTEST_MEMHEAP_TC=y -CONFIG_UTEST_SMALL_MEM_TC=y \ No newline at end of file +CONFIG_RT_UTEST_SELF_PASS=y +CONFIG_RT_UTEST_MEMHEAP=y +CONFIG_RT_UTEST_SMALL_MEM=y \ No newline at end of file diff --git a/examples/utest/configs/kernel/atomic_c11.cfg b/examples/utest/configs/kernel/atomic_c11.cfg index 394b81dd7ab..1ea6765289a 100644 --- a/examples/utest/configs/kernel/atomic_c11.cfg +++ b/examples/utest/configs/kernel/atomic_c11.cfg @@ -1,4 +1,4 @@ -CONFIG_UTEST_ATOMIC_TC=y +CONFIG_RT_UTEST_ATOMIC=y CONFIG_RT_USING_CI_ACTION=y # dependencies CONFIG_RT_USING_TIMER_SOFT=y diff --git a/examples/utest/configs/kernel/ipc.cfg b/examples/utest/configs/kernel/ipc.cfg index 56e13962573..3db6e14f8c9 100644 --- a/examples/utest/configs/kernel/ipc.cfg +++ b/examples/utest/configs/kernel/ipc.cfg @@ -2,12 +2,12 @@ CONFIG_RT_CONSOLEBUF_SIZE=1024 CONFIG_RT_USING_CI_ACTION=y -CONFIG_UTEST_SEMAPHORE_TC=y -CONFIG_UTEST_EVENT_TC=y -CONFIG_UTEST_MESSAGEQUEUE_TC=y -CONFIG_UTEST_SIGNAL_TC=y -CONFIG_UTEST_MUTEX_TC=y -CONFIG_UTEST_MAILBOX_TC=y +CONFIG_RT_UTEST_SEMAPHORE=y +CONFIG_RT_UTEST_EVENT=y +CONFIG_RT_UTEST_MESSAGEQUEUE=y +CONFIG_RT_UTEST_SIGNAL=y +CONFIG_RT_UTEST_MUTEX=y +CONFIG_RT_UTEST_MAILBOX=y CONFIG_RT_USING_SEMAPHORE=y CONFIG_RT_USING_EVENT=y diff --git a/examples/utest/configs/kernel/kernel_basic.cfg b/examples/utest/configs/kernel/kernel_basic.cfg index 5d547aae7d0..d378e0ac7fa 100644 --- a/examples/utest/configs/kernel/kernel_basic.cfg +++ b/examples/utest/configs/kernel/kernel_basic.cfg @@ -2,13 +2,13 @@ CONFIG_RT_CONSOLEBUF_SIZE=1024 CONFIG_RT_USING_CI_ACTION=y -CONFIG_UTEST_OBJECT_TC=y -CONFIG_UTEST_IRQ_TC=y -CONFIG_UTEST_THREAD_TC=y +CONFIG_RT_UTEST_OBJECT=y +CONFIG_RT_UTEST_IRQ=y +CONFIG_RT_UTEST_THREAD=y CONFIG_RT_UTEST_DRIVERS_CORE=y -CONFIG_UTEST_ATOMIC_TC=y -CONFIG_UTEST_HOOKLIST_TC=y -CONFIG_UTEST_MTSAFE_KPRINT_TC=y -CONFIG_UTEST_SCHEDULER_TC=y +CONFIG_RT_UTEST_ATOMIC=y +CONFIG_RT_UTEST_HOOKLIST=y +CONFIG_RT_UTEST_MTSAFE_KPRINT=y +CONFIG_RT_UTEST_SCHEDULER=y CONFIG_UTEST_THR_STACK_SIZE=8192 \ No newline at end of file diff --git a/examples/utest/configs/kernel/mem.cfg b/examples/utest/configs/kernel/mem.cfg index d05f9d272a2..e2bffb9ecff 100644 --- a/examples/utest/configs/kernel/mem.cfg +++ b/examples/utest/configs/kernel/mem.cfg @@ -2,8 +2,8 @@ CONFIG_RT_CONSOLEBUF_SIZE=1024 CONFIG_RT_USING_CI_ACTION=y -CONFIG_UTEST_MEMHEAP_TC=y -CONFIG_UTEST_SMALL_MEM_TC=y +CONFIG_RT_UTEST_MEMHEAP=y +CONFIG_RT_UTEST_SMALL_MEM=y CONFIG_UTEST_MEMPOOL_TC=y CONFIG_UTEST_THR_STACK_SIZE=8192 \ No newline at end of file diff --git a/examples/utest/configs/rtsmart/rtsmart.cfg b/examples/utest/configs/rtsmart/rtsmart.cfg index 94830baaeee..efc60640796 100644 --- a/examples/utest/configs/rtsmart/rtsmart.cfg +++ b/examples/utest/configs/rtsmart/rtsmart.cfg @@ -1,4 +1,4 @@ -CONFIG_UTEST_MEMHEAP_TC=y +CONFIG_RT_UTEST_MEMHEAP=y # dependencies CONFIG_RT_USING_SMART=y diff --git a/examples/utest/testcases/cpp11/Kconfig b/examples/utest/testcases/cpp11/Kconfig index f628309c847..3259e26a39d 100644 --- a/examples/utest/testcases/cpp11/Kconfig +++ b/examples/utest/testcases/cpp11/Kconfig @@ -1,6 +1,6 @@ menu "CPP11 Testcase" -config UTEST_CPP11_THREAD_TC +config RT_UTEST_CPP11_THREAD bool "Cpp11 thread test" select RT_USING_CPLUSPLUS select RT_USING_CPLUSPLUS11 diff --git a/examples/utest/testcases/cpp11/SConscript b/examples/utest/testcases/cpp11/SConscript index e82d652f62a..f9c8b3e1fcd 100644 --- a/examples/utest/testcases/cpp11/SConscript +++ b/examples/utest/testcases/cpp11/SConscript @@ -5,7 +5,7 @@ cwd = GetCurrentDir() src = [] CPPPATH = [cwd] -if GetDepend('UTEST_CPP11_THREAD_TC'): +if GetDepend('RT_UTEST_CPP11_THREAD'): src += Glob('tc_*.cpp') group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES', 'RT_USING_CPLUSPLUS'], CPPPATH = CPPPATH) diff --git a/examples/utest/testcases/mm/Kconfig b/examples/utest/testcases/mm/Kconfig index b1c74e14d54..434df5b9347 100644 --- a/examples/utest/testcases/mm/Kconfig +++ b/examples/utest/testcases/mm/Kconfig @@ -1,13 +1,13 @@ menu "Memory Management Subsytem Testcase" - config UTEST_MM_API_TC + config RT_UTEST_MM_API bool "Enable Utest for MM API" default n help The test covers the Memory Management APIs under the `components/mm` and `libcpu/[mmu.*|tlb.*|cache.*]` - config UTEST_MM_LWP_TC + config RT_UTEST_MM_LWP bool "Enable Utest for MM API in lwp" default n help diff --git a/examples/utest/testcases/mm/SConscript b/examples/utest/testcases/mm/SConscript index 93c0667c0b1..edef3914f13 100644 --- a/examples/utest/testcases/mm/SConscript +++ b/examples/utest/testcases/mm/SConscript @@ -5,7 +5,7 @@ cwd = GetCurrentDir() src = [] CPPPATH = [cwd] -if GetDepend(['UTEST_MM_API_TC', 'RT_USING_SMART']): +if GetDepend(['RT_UTEST_MM_API', 'RT_USING_SMART']): # deprecated test, will be rewrited in the future # src += ['mm_api_tc.c', 'mm_libcpu_tc.c'] src += ['rt_ioremap.c'] @@ -14,10 +14,10 @@ if GetDepend(['UTEST_MM_API_TC', 'RT_USING_SMART']): src += ['lwp_mmap_expand.c', 'lwp_mmap_map_fixed.c', 'lwp_mmap_fix_private.c'] src += ['lwp_mmap_fd.c', 'lwp_mmap_fd_map_fixed_merge.c', 'lwp_mmap_fd_map_fixed_split.c'] -if GetDepend(['UTEST_MM_API_TC', 'RT_USING_MEMBLOCK']): +if GetDepend(['RT_UTEST_MM_API', 'RT_USING_MEMBLOCK']): src += ['mm_memblock_tc.c'] -if GetDepend(['UTEST_MM_LWP_TC', 'RT_USING_SMART']): +if GetDepend(['RT_UTEST_MM_LWP', 'RT_USING_SMART']): src += ['mm_lwp_tc.c'] group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES'], CPPPATH = CPPPATH) diff --git a/examples/utest/testcases/tmpfs/Kconfig b/examples/utest/testcases/tmpfs/Kconfig index b3a0637950f..c18979f750d 100644 --- a/examples/utest/testcases/tmpfs/Kconfig +++ b/examples/utest/testcases/tmpfs/Kconfig @@ -1,6 +1,6 @@ menu "Tmpfs Testcase" -config UTEST_TMPFS_CP +config RT_UTEST_TMPFS_CP bool "tmpfs cp test" default n endmenu diff --git a/examples/utest/testcases/tmpfs/SConscript b/examples/utest/testcases/tmpfs/SConscript index 1467931a765..126fc7870b5 100644 --- a/examples/utest/testcases/tmpfs/SConscript +++ b/examples/utest/testcases/tmpfs/SConscript @@ -5,7 +5,7 @@ cwd = GetCurrentDir() src = [] CPPPATH = [cwd] -if GetDepend(['RT_USING_SMART','UTEST_TMPFS_CP']): +if GetDepend(['RT_USING_SMART','RT_UTEST_TMPFS_CP']): src += ['tmpfs.c'] group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES'], CPPPATH = CPPPATH) diff --git a/src/utest/Kconfig b/src/utest/Kconfig index c9580f099f3..6fee9e86260 100644 --- a/src/utest/Kconfig +++ b/src/utest/Kconfig @@ -1,81 +1,81 @@ menu "Kernel Testcase" -config UTEST_MEMHEAP_TC +config RT_UTEST_MEMHEAP bool "memheap stability test" default n depends on RT_USING_MEMHEAP -config UTEST_SMALL_MEM_TC +config RT_UTEST_SMALL_MEM bool "mem test" default n depends on RT_USING_SMALL_MEM -config UTEST_OBJECT_TC +config RT_UTEST_OBJECT select RT_USING_DEVICE select RT_USING_SEMAPHORE bool "object test" default n -config UTEST_SLAB_TC +config RT_UTEST_SLAB bool "slab test" default n depends on RT_USING_SLAB -config UTEST_IRQ_TC +config RT_UTEST_IRQ bool "IRQ test" default n -config UTEST_SEMAPHORE_TC +config RT_UTEST_SEMAPHORE bool "semaphore test" default n depends on RT_USING_SEMAPHORE -config UTEST_EVENT_TC +config RT_UTEST_EVENT bool "event test" default n depends on RT_USING_EVENT -config UTEST_TIMER_TC +config RT_UTEST_TIMER bool "timer test" default n -config UTEST_MESSAGEQUEUE_TC +config RT_UTEST_MESSAGEQUEUE bool "message queue test" default n -config UTEST_SIGNAL_TC +config RT_UTEST_SIGNAL bool "signal test" select RT_USING_SIGNALS default n -config UTEST_MUTEX_TC +config RT_UTEST_MUTEX bool "mutex test" default n -config UTEST_MAILBOX_TC +config RT_UTEST_MAILBOX bool "mailbox test" default n -config UTEST_THREAD_TC +config RT_UTEST_THREAD bool "thread test" default n select RT_USING_TIMER_SOFT select RT_USING_THREAD -config UTEST_ATOMIC_TC +config RT_UTEST_ATOMIC bool "atomic test" default n -config UTEST_HOOKLIST_TC +config RT_UTEST_HOOKLIST bool "hook list test" select RT_USING_HOOKLIST default n -config UTEST_MTSAFE_KPRINT_TC +config RT_UTEST_MTSAFE_KPRINT bool "mtsafe kprint test" default n -config UTEST_SCHEDULER_TC +config RT_UTEST_SCHEDULER bool "scheduler test" default n diff --git a/src/utest/SConscript b/src/utest/SConscript index fae3eb8a6e3..88ff9f54bc0 100644 --- a/src/utest/SConscript +++ b/src/utest/SConscript @@ -5,61 +5,61 @@ cwd = GetCurrentDir() src = [] CPPPATH = [cwd] -if GetDepend(['UTEST_OBJECT_TC']): +if GetDepend(['RT_UTEST_OBJECT']): src += ['object_tc.c'] -if GetDepend(['UTEST_MEMHEAP_TC']): +if GetDepend(['RT_UTEST_MEMHEAP']): src += ['memheap_tc.c'] -if GetDepend(['UTEST_SMALL_MEM_TC']): +if GetDepend(['RT_UTEST_SMALL_MEM']): src += ['mem_tc.c'] -if GetDepend(['UTEST_SLAB_TC']): +if GetDepend(['RT_UTEST_SLAB']): src += ['slab_tc.c'] -if GetDepend(['UTEST_IRQ_TC']): +if GetDepend(['RT_UTEST_IRQ']): src += ['irq_tc.c'] -if GetDepend(['UTEST_SEMAPHORE_TC']): +if GetDepend(['RT_UTEST_SEMAPHORE']): src += ['semaphore_tc.c'] -if GetDepend(['UTEST_EVENT_TC']): +if GetDepend(['RT_UTEST_EVENT']): src += ['event_tc.c'] -if GetDepend(['UTEST_TIMER_TC']): +if GetDepend(['RT_UTEST_TIMER']): src += ['timer_tc.c'] -if GetDepend(['UTEST_MESSAGEQUEUE_TC']): +if GetDepend(['RT_UTEST_MESSAGEQUEUE']): src += ['messagequeue_tc.c'] -if GetDepend(['UTEST_SIGNAL_TC']): +if GetDepend(['RT_UTEST_SIGNAL']): src += ['signal_tc.c'] -if GetDepend(['UTEST_MUTEX_TC']): +if GetDepend(['RT_UTEST_MUTEX']): src += ['mutex_tc.c', 'mutex_pi_tc.c'] -if GetDepend(['UTEST_MAILBOX_TC']): +if GetDepend(['RT_UTEST_MAILBOX']): src += ['mailbox_tc.c'] -if GetDepend(['UTEST_THREAD_TC']): +if GetDepend(['RT_UTEST_THREAD']): src += ['thread_tc.c'] src += ['thread_overflow_tc.c'] src += ['thread_suspend_tc.c'] -if GetDepend(['UTEST_ATOMIC_TC']): +if GetDepend(['RT_UTEST_ATOMIC']): src += ['atomic_tc.c'] -if GetDepend(['UTEST_HOOKLIST_TC']): +if GetDepend(['RT_UTEST_HOOKLIST']): src += ['hooklist_tc.c'] -if GetDepend(['UTEST_MTSAFE_KPRINT_TC']): +if GetDepend(['RT_UTEST_MTSAFE_KPRINT']): src += ['mtsafe_kprint_tc.c'] if GetDepend(['UTEST_MEMPOOL_TC']): src += ['mempool_tc.c'] # Stressful testcase for scheduler (MP/UP) -if GetDepend(['UTEST_SCHEDULER_TC']): +if GetDepend(['RT_UTEST_SCHEDULER']): src += ['sched_timed_sem_tc.c'] src += ['sched_timed_mtx_tc.c'] src += ['sched_mtx_tc.c'] diff --git a/src/utest/smp/Kconfig b/src/utest/smp/Kconfig index e7450b477fd..5900fcdf0b7 100644 --- a/src/utest/smp/Kconfig +++ b/src/utest/smp/Kconfig @@ -1,22 +1,22 @@ menu "Kernel SMP Testcase" -config UTEST_SMP_AFFFINITY_TC +config RT_UTEST_SMP_AFFFINITY bool "smp affinity and thread priority test1" default n -config UTEST_SMP_ASSIGNED_IDLE_CORE_TC +config RT_UTEST_SMP_ASSIGNED_IDLE_CORE bool "smp threads auto assign to idle cores for test" default n -config UTEST_SMP_INTERRUPT_PRI_TC +config RT_UTEST_SMP_INTERRUPT_PRI bool "smp interrupt priority test" default n -config UTEST_SMP_SPINLOCK_TC +config RT_UTEST_SMP_SPINLOCK bool "smp spinlock test" default n -config UTEST_SMP_THREAD_PREEMPTION_TC +config RT_UTEST_SMP_THREAD_PREEMPTION bool "smp threads preemption test" default n diff --git a/src/utest/smp/SConscript b/src/utest/smp/SConscript index a15753f7be3..5a91d05dbe3 100644 --- a/src/utest/smp/SConscript +++ b/src/utest/smp/SConscript @@ -5,19 +5,19 @@ cwd = GetCurrentDir() src = [] CPPPATH = [cwd] -if GetDepend(['UTEST_SMP_SPINLOCK_TC']): +if GetDepend(['RT_UTEST_SMP_SPINLOCK']): src += ['smp_spinlock_tc.c'] -if GetDepend(['UTEST_SMP_ASSIGNED_IDLE_CORE_TC']): +if GetDepend(['RT_UTEST_SMP_ASSIGNED_IDLE_CORE']): src += ['smp_assigned_idle_cores_tc.c'] -if GetDepend(['UTEST_SMP_INTERRUPT_PRI_TC']): +if GetDepend(['RT_UTEST_SMP_INTERRUPT_PRI']): src += ['smp_interrupt_pri_tc.c'] -if GetDepend(['UTEST_SMP_THREAD_PREEMPTION_TC']): +if GetDepend(['RT_UTEST_SMP_THREAD_PREEMPTION']): src += ['smp_thread_preemption_tc.c'] -if GetDepend(['UTEST_SMP_AFFFINITY_TC']): +if GetDepend(['RT_UTEST_SMP_AFFFINITY']): src += ['smp_bind_affinity_tc.c'] src += ['smp_affinity_pri1_tc.c'] src += ['smp_affinity_pri2_tc.c']