From 16d725e5782896d1c20f4847cc33db504dd46a94 Mon Sep 17 00:00:00 2001 From: CYFS <2805686936@qq.com> Date: Fri, 6 Nov 2026 09:45:46 +0800 Subject: [utest][can] Add CAN send and receive tests (#11752) * [utest][can] Add CAN send and receive tests * [utest][can] Fix external CAN FD receive timeout Check the no-progress timeout after duplicate or unmatched frames, and only wait on the receive semaphore when no complete frame is available. Exit immediately once all expected patterns have been received. Format the test with the current mainline configuration and clang-format 22.1.8. Validation: reproduced the original duplicate/unmatched-frame hang with a 50-tick timeout and a 1000-tick watchdog. All 22 host-stub scenarios pass, including timeout renewal, tick wraparound, empty reads, error propagation, and successful reception. The mainline formatting check also passes. No full BSP build or hardware test was performed. --- components/drivers/can/SConscript | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'components/drivers/can/SConscript') diff --git a/components/drivers/can/SConscript b/components/drivers/can/SConscript index 28d45d016d..05ad78a494 100644 --- a/components/drivers/can/SConscript +++ b/components/drivers/can/SConscript @@ -1,3 +1,4 @@ +import os from building import * cwd = GetCurrentDir() @@ -9,4 +10,9 @@ if not GetDepend('RT_USING_DM'): group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_CAN'], 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') -- cgit v1.3.1