utest: smp_call: move from example to components/drivers/smp_call

Also,
- Rename UTEST_SMP_CALL_FUNC to RT_UTEST_SMP_CALL_FUNC.
- Add depends on RT_USING_SMP in Kconfig for RT_UTEST_SMP_CALL_FUNC
- Follow the naming rules of utest case to update the cases' name.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
Chen Wang
2025-10-11 14:46:33 +08:00
committed by R b b666
parent 5b99f61af8
commit 66448d9e96
9 changed files with 19 additions and 13 deletions

View File

@@ -14,7 +14,6 @@ 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"
rsource "examples/utest/testcases/smp_call/Kconfig"
rsource "examples/utest/testcases/perf/Kconfig"
rsource "src/klibc/utest/Kconfig"
@@ -22,7 +21,7 @@ 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/drivers/smp_call/utest/Kconfig"
rsource "components/dfs/utest/Kconfig"
rsource "components/net/utest/Kconfig"

View File

@@ -7,4 +7,9 @@ if GetDepend("RT_USING_SMP"):
CPPPATH = [cwd]
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

@@ -0,0 +1,8 @@
menu "SMP-Call Unit Testcases"
config RT_UTEST_SMP_CALL_FUNC
bool "SMP-Call smoke test"
default n
depends on RT_USING_SMP
endmenu

View File

@@ -5,7 +5,7 @@ cwd = GetCurrentDir()
src = []
CPPPATH = [cwd]
if GetDepend(['RT_USING_SMP', 'UTEST_SMP_CALL_FUNC']):
if GetDepend(['RT_UTEST_SMP_CALL_FUNC']):
src += Glob('smp*.c')
group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES'], CPPPATH = CPPPATH)

View File

@@ -87,4 +87,4 @@ static void _testcase(void)
UTEST_UNIT_RUN(_blocking_call);
}
UTEST_TC_EXPORT(_testcase, "testcase.smp.smoke.001", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(_testcase, "components.drivers.smp_call.smoke_001", utest_tc_init, utest_tc_cleanup, 10);

View File

@@ -129,4 +129,4 @@ static void _testcase(void)
UTEST_UNIT_RUN(_blocking_mtsafe_call);
}
UTEST_TC_EXPORT(_testcase, "testcase.smp.smoke.002", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(_testcase, "components.drivers.smp_call.smoke_002", utest_tc_init, utest_tc_cleanup, 10);

View File

@@ -125,4 +125,4 @@ static void _testcase(void)
UTEST_UNIT_RUN(_async_call);
}
UTEST_TC_EXPORT(_testcase, "testcase.smp.smoke.003", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(_testcase, "components.drivers.smp_call.smoke_003", utest_tc_init, utest_tc_cleanup, 10);

View File

@@ -207,4 +207,4 @@ static void _testcase(void)
UTEST_UNIT_RUN(_test_reentr_isr_main);
}
UTEST_TC_EXPORT(_testcase, "testcase.smp.smoke.004", utest_tc_init, utest_tc_cleanup, 10);
UTEST_TC_EXPORT(_testcase, "components.drivers.smp_call.smoke_004", utest_tc_init, utest_tc_cleanup, 10);

View File

@@ -1,6 +0,0 @@
menu "SMP-Call Testcase"
config UTEST_SMP_CALL_FUNC
bool "SMP-Call test cases"
default n
endmenu