summaryrefslogtreecommitdiff
path: root/src/utest/SConscript
blob: 7a532625d1c12aa676693213a094224f0f9f4636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Import('rtconfig')
from building import *

cwd     = GetCurrentDir()
src     = []
CPPPATH = [cwd]

if GetDepend(['RT_UTEST_OBJECT']):
    src += ['object_tc.c']

if GetDepend(['RT_UTEST_MEMHEAP']):
    src += ['memheap_tc.c']

if GetDepend(['RT_UTEST_SMALL_MEM']):
    src += ['mem_tc.c']

if GetDepend(['RT_UTEST_SLAB']):
    src += ['slab_tc.c']

if GetDepend(['RT_UTEST_IRQ']):
    src += ['irq_tc.c']

if GetDepend(['RT_UTEST_SEMAPHORE']):
    src += ['semaphore_tc.c']

if GetDepend(['RT_UTEST_EVENT']):
    src += ['event_tc.c']

if GetDepend(['RT_UTEST_TIMER']):
    src += ['timer_tc.c']

if GetDepend(['RT_UTEST_MESSAGEQUEUE']):
    src += ['messagequeue_tc.c']

if GetDepend(['RT_UTEST_SIGNAL']):
    src += ['signal_tc.c']

if GetDepend(['RT_UTEST_MUTEX']):
    src += ['mutex_tc.c', 'mutex_pi_tc.c']

if GetDepend(['RT_UTEST_MAILBOX']):
    src += ['mailbox_tc.c']

if GetDepend(['RT_UTEST_THREAD']):
    src += ['thread_tc.c']
    src += ['thread_overflow_tc.c']
    src += ['thread_suspend_tc.c']

if GetDepend(['RT_UTEST_ATOMIC']):
    src += ['atomic_tc.c']

if GetDepend(['RT_UTEST_HOOKLIST']):
    src += ['hooklist_tc.c']

if GetDepend(['RT_UTEST_MTSAFE_KPRINT']):
    src += ['mtsafe_kprint_tc.c']

if GetDepend(['RT_UTEST_MEMPOOL']):
    src += ['mempool_tc.c']

# Stressful testcase for scheduler (MP/UP)
if GetDepend(['RT_UTEST_SCHEDULER']):
    src += ['sched_timed_sem_tc.c']
    src += ['sched_timed_mtx_tc.c']
    src += ['sched_mtx_tc.c']
    src += ['sched_sem_tc.c', 'sched_thread_tc.c']

group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES'], 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')