2021-06-03 14:57:26 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2022-02-10 17:29:17 +08:00
|
|
|
src = []
|
|
|
|
CPPPATH = [cwd]
|
2021-06-03 14:57:26 +08:00
|
|
|
|
|
|
|
if GetDepend(['UTEST_MEMHEAP_TC']):
|
|
|
|
src += ['memheap_tc.c']
|
|
|
|
|
2021-12-16 16:23:58 +08:00
|
|
|
if GetDepend(['UTEST_SMALL_MEM_TC']):
|
|
|
|
src += ['mem_tc.c']
|
|
|
|
|
|
|
|
if GetDepend(['UTEST_SLAB_TC']):
|
|
|
|
src += ['slab_tc.c']
|
|
|
|
|
2021-08-17 22:14:33 +08:00
|
|
|
if GetDepend(['UTEST_IRQ_TC']):
|
|
|
|
src += ['irq_tc.c']
|
2023-01-09 10:14:23 +08:00
|
|
|
|
2021-08-12 11:43:15 +08:00
|
|
|
if GetDepend(['UTEST_SEMAPHORE_TC']):
|
|
|
|
src += ['semaphore_tc.c']
|
|
|
|
|
2021-08-17 14:59:36 +08:00
|
|
|
if GetDepend(['UTEST_EVENT_TC']):
|
|
|
|
src += ['event_tc.c']
|
|
|
|
|
2021-08-23 12:37:54 +08:00
|
|
|
if GetDepend(['UTEST_TIMER_TC']):
|
|
|
|
src += ['timer_tc.c']
|
|
|
|
|
2021-09-01 10:13:00 +08:00
|
|
|
if GetDepend(['UTEST_MESSAGEQUEUE_TC']):
|
|
|
|
src += ['messagequeue_tc.c']
|
|
|
|
|
2021-09-04 18:04:37 +08:00
|
|
|
if GetDepend(['UTEST_SIGNAL_TC']):
|
|
|
|
src += ['signal_tc.c']
|
|
|
|
|
2021-09-06 15:30:08 +08:00
|
|
|
if GetDepend(['UTEST_MUTEX_TC']):
|
2024-09-07 05:44:02 +08:00
|
|
|
src += ['mutex_tc.c', 'mutex_pi_tc.c']
|
2021-09-06 15:30:08 +08:00
|
|
|
|
2021-09-09 10:15:26 +08:00
|
|
|
if GetDepend(['UTEST_MAILBOX_TC']):
|
|
|
|
src += ['mailbox_tc.c']
|
|
|
|
|
2021-10-11 13:47:26 +08:00
|
|
|
if GetDepend(['UTEST_THREAD_TC']):
|
|
|
|
src += ['thread_tc.c']
|
|
|
|
|
2024-05-21 08:56:35 +08:00
|
|
|
if GetDepend(['UTEST_DEVICE_TC']):
|
|
|
|
src += ['device_tc.c']
|
|
|
|
|
2023-03-23 20:06:50 +08:00
|
|
|
if GetDepend(['UTEST_ATOMIC_TC']):
|
|
|
|
src += ['atomic_tc.c']
|
|
|
|
|
2023-12-23 17:59:18 +08:00
|
|
|
if GetDepend(['UTEST_HOOKLIST_TC']):
|
|
|
|
src += ['hooklist_tc.c']
|
|
|
|
|
2024-01-09 20:37:47 +08:00
|
|
|
if GetDepend(['UTEST_MTSAFE_KPRINT_TC']):
|
|
|
|
src += ['mtsafe_kprint_tc.c']
|
|
|
|
|
2024-02-23 17:49:15 +08:00
|
|
|
# Stressful testcase for scheduler (MP/UP)
|
|
|
|
if GetDepend(['UTEST_SCHEDULER_TC']):
|
|
|
|
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']
|
|
|
|
|
2022-02-10 17:29:17 +08:00
|
|
|
group = DefineGroup('utestcases', src, depend = ['RT_USING_UTESTCASES'], CPPPATH = CPPPATH)
|
2021-06-03 14:57:26 +08:00
|
|
|
|
2024-08-27 17:13:17 +08:00
|
|
|
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'))
|
|
|
|
|
2021-06-03 14:57:26 +08:00
|
|
|
Return('group')
|