summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCYFS <[email protected]>2026-06-11 14:41:40 +0800
committerRbb666 <[email protected]>2026-06-12 14:22:53 +0800
commit103d4c1d92f3844dfcf4473957593af3449bec06 (patch)
treefce4bd78b90e2eddb7f34958f18a134ee3637fb4
parent23187dedaa0994960dc03e08c38a70fa4ca4d0d4 (diff)
utest: move lwp testcases to components/lwp
Signed-off-by: CYFS <[email protected]>
-rw-r--r--Kconfig.utestcases2
-rw-r--r--components/lwp/SConscript1
-rw-r--r--components/lwp/utest/Kconfig8
-rw-r--r--components/lwp/utest/SConscript (renamed from examples/utest/testcases/lwp/SConscript)2
-rw-r--r--components/lwp/utest/condvar_broadcast_tc.c (renamed from examples/utest/testcases/lwp/condvar_broadcast_tc.c)0
-rw-r--r--components/lwp/utest/condvar_signal_tc.c (renamed from examples/utest/testcases/lwp/condvar_signal_tc.c)0
-rw-r--r--components/lwp/utest/condvar_timedwait_tc.c (renamed from examples/utest/testcases/lwp/condvar_timedwait_tc.c)0
-rw-r--r--examples/utest/README.md3
-rw-r--r--examples/utest/testcases/SConscript15
-rw-r--r--tools/building.py6
10 files changed, 12 insertions, 25 deletions
diff --git a/Kconfig.utestcases b/Kconfig.utestcases
index 909487dea0..de283e5e81 100644
--- a/Kconfig.utestcases
+++ b/Kconfig.utestcases
@@ -23,13 +23,13 @@ menu "RT-Thread Utestcases"
rsource "components/dfs/utest/Kconfig"
rsource "components/dfs/dfs_v2/filesystems/tmpfs/utest/Kconfig"
rsource "components/libc/cplusplus/utest/Kconfig"
+ rsource "components/lwp/utest/Kconfig"
rsource "components/mm/utest/Kconfig"
rsource "components/net/utest/Kconfig"
rsource "components/utilities/utest/utest/Kconfig"
endmenu
-
endif
endmenu
diff --git a/components/lwp/SConscript b/components/lwp/SConscript
index 56279cb998..1c97444e51 100644
--- a/components/lwp/SConscript
+++ b/components/lwp/SConscript
@@ -57,4 +57,5 @@ if not GetDepend(['LWP_USING_RUNTIME']):
group = DefineGroup('lwProcess', src, depend = ['RT_USING_SMART'], CPPPATH = CPPPATH)
group = group + SConscript(os.path.join('vdso', 'SConscript'))
+group = group + SConscript(os.path.join('utest', 'SConscript'))
Return('group')
diff --git a/components/lwp/utest/Kconfig b/components/lwp/utest/Kconfig
new file mode 100644
index 0000000000..ac2900d93a
--- /dev/null
+++ b/components/lwp/utest/Kconfig
@@ -0,0 +1,8 @@
+menu "LWP Testcase"
+
+config RT_UTEST_LWP
+ bool "Enable LWP condvar test"
+ depends on RT_USING_SMART
+ default n
+
+endmenu
diff --git a/examples/utest/testcases/lwp/SConscript b/components/lwp/utest/SConscript
index 68fe5bea41..c7890d6be7 100644
--- a/examples/utest/testcases/lwp/SConscript
+++ b/components/lwp/utest/SConscript
@@ -5,7 +5,7 @@ cwd = GetCurrentDir()
src = []
CPPPATH = [cwd]
-if GetDepend(['UTEST_LWP_TC', 'RT_USING_SMART']):
+if GetDepend(['RT_UTEST_LWP', 'RT_USING_SMART']):
src += ['condvar_timedwait_tc.c', 'condvar_broadcast_tc.c', 'condvar_signal_tc.c']
group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES'], CPPPATH = CPPPATH)
diff --git a/examples/utest/testcases/lwp/condvar_broadcast_tc.c b/components/lwp/utest/condvar_broadcast_tc.c
index 234ae697a1..234ae697a1 100644
--- a/examples/utest/testcases/lwp/condvar_broadcast_tc.c
+++ b/components/lwp/utest/condvar_broadcast_tc.c
diff --git a/examples/utest/testcases/lwp/condvar_signal_tc.c b/components/lwp/utest/condvar_signal_tc.c
index 82129560eb..82129560eb 100644
--- a/examples/utest/testcases/lwp/condvar_signal_tc.c
+++ b/components/lwp/utest/condvar_signal_tc.c
diff --git a/examples/utest/testcases/lwp/condvar_timedwait_tc.c b/components/lwp/utest/condvar_timedwait_tc.c
index 43cfceb695..43cfceb695 100644
--- a/examples/utest/testcases/lwp/condvar_timedwait_tc.c
+++ b/components/lwp/utest/condvar_timedwait_tc.c
diff --git a/examples/utest/README.md b/examples/utest/README.md
index 04c3f910f1..f21884b5b7 100644
--- a/examples/utest/README.md
+++ b/examples/utest/README.md
@@ -9,13 +9,12 @@
| 目录 | 用途 |
| --------- | ------------------------------------------------------------ |
| configs | 配置文件集合(每一个目录代表一种功能集合,如:kernel,net等) |
-| testcases | 测试用例源代码 |
## 如何贡献
### 1. 编写测试用例
-参考已有的测试用例在 [examples\utest\testcases](./testcases) 目录下添加自己的测试用例。测试用例的编写方法参考文档中心[《utest 测试框架》章节](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/programming-manual/utest/utest)。
+参考已有的测试用例,在对应模块目录下添加 `utest` 目录并维护自己的测试用例,例如串口测试用例位于 `components/drivers/serial/utest`。测试用例的编写方法参考文档中心[《utest 测试框架》章节](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/programming-manual/utest/utest)。
### 2. 本地测试
diff --git a/examples/utest/testcases/SConscript b/examples/utest/testcases/SConscript
deleted file mode 100644
index 4c815c49b8..0000000000
--- a/examples/utest/testcases/SConscript
+++ /dev/null
@@ -1,15 +0,0 @@
-# RT-Thread building script for bridge
-
-import os
-from building import *
-
-cwd = GetCurrentDir()
-objs = []
-list = os.listdir(cwd)
-
-for d in list:
- path = os.path.join(cwd, d)
- if os.path.isfile(os.path.join(path, 'SConscript')):
- objs = objs + SConscript(os.path.join(d, 'SConscript'))
-
-Return('objs')
diff --git a/tools/building.py b/tools/building.py
index 801db1aa4d..6f0eb78775 100644
--- a/tools/building.py
+++ b/tools/building.py
@@ -386,12 +386,6 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
variant_dir=kernel_vdir + '/components',
duplicate=0,
exports='remove_components'))
- # include testcases
- if os.path.isfile(os.path.join(Rtt_Root, 'examples/utest/testcases/SConscript')):
- objs.extend(SConscript(Rtt_Root + '/examples/utest/testcases/SConscript',
- variant_dir=kernel_vdir + '/examples/utest/testcases',
- duplicate=0))
-
return objs
def PrepareModuleBuilding(env, root_directory, bsp_directory):