Skip to content

Commit 8399b9d

Browse files
committed
add sys pref frameworks
1 parent a1e8651 commit 8399b9d

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

examples/utest/testcases/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ rsource "posix/Kconfig"
1717
rsource "mm/Kconfig"
1818
rsource "tmpfs/Kconfig"
1919
rsource "smp_call/Kconfig"
20+
rsource "pref/Kconfig"
2021
endif
2122

2223
endmenu
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
menu "System Performance Testcase"
2+
3+
config UTEST_SYS_PREF_TC
4+
bool "system performance test"
5+
default n
6+
7+
choice
8+
prompt "Select time reference for System Performance Testcase"
9+
default USING_TICK_AS_TIME_REF
10+
depends on UTEST_SYS_PREF_TC
11+
12+
config USING_HWTIME_AS_TIME_REF
13+
bool "Use hardware timer as time reference"
14+
depends on RT_USING_HWTIMER
15+
16+
config USING_TICK_AS_TIME_REF
17+
bool "Use system tick as time reference"
18+
19+
endchoice
20+
21+
config UTEST_HWTIMER_DEV_NAME
22+
string "Hardware timer device name"
23+
default "timer0"
24+
depends on USING_HWTIME_AS_TIME_REF
25+
help
26+
Specify the hardware timer device name used for context switch testing (e.g., timer11).
27+
28+
config UTEST_SYS_CONTEXT_SWITCH
29+
bool "system context switch test"
30+
default n
31+
32+
endmenu
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Import('rtconfig')
2+
from building import *
3+
4+
cwd = GetCurrentDir()
5+
src = []
6+
CPPPATH = [cwd]
7+
8+
if GetDepend(['UTEST_SYS_CONTEXT_SWITCH']):
9+
src += ['context_switch.c']
10+
11+
group = DefineGroup('utestcases', src, depend = ['UTEST_SYS_PREF_TC'], CPPPATH = CPPPATH)
12+
13+
Return('group')

0 commit comments

Comments
 (0)