Skip to content

Commit ca09785

Browse files
committed
add sys pref frameworks
1 parent a1e8651 commit ca09785

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-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 "perf/Kconfig"
2021
endif
2122

2223
endmenu
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
menu "System Performance Testcase"
2+
3+
config UTEST_SYS_PERF_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_PERF_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 && UTEST_SYS_PERF_TC
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+
depends on UTEST_SYS_PERF_TC
32+
33+
config UTEST_SYS_IRQ_LATENCY
34+
bool "system IRQ LATENCY test"
35+
default n
36+
depends on RT_USING_HWTIMER && USING_HWTIME_AS_TIME_REF && UTEST_SYS_PERF_TC
37+
38+
config UTEST_SYS_THREAD_EVENT
39+
bool "system thread event tests"
40+
default n
41+
depends on UTEST_SYS_PERF_TC
42+
43+
endmenu
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
if GetDepend(['UTEST_SYS_IRQ_LATENCY']):
12+
src += ['irq_latency.c']
13+
14+
if GetDepend(['UTEST_SYS_THREAD_EVENT']):
15+
src += ['rt_perf_thread_event.c']
16+
17+
group = DefineGroup('utestcases', src, depend = ['UTEST_SYS_PERF_TC'], CPPPATH = CPPPATH)
18+
19+
Return('group')

0 commit comments

Comments
 (0)