demo-epb — Test Summary Report

Date: 2026-05-13T07:33:50.824102+00:00

Total: 46 tests, 46 passed, 0 failed — PASS

Per Test Suite

SuiteCountPassedFailedRequirements
test_switch_debouncer550SWE-025
test_actuator_driver11110SWE-006, SWE-013, SWE-014, SWE-015
test_apply_controller12120SWE-001, SWE-002, SWE-003, SWE-004, SWE-005
test_safety_manager18180SWE-007, SWE-008, SWE-009, SWE-010, SWE-011, SWE-012

test_switch_debouncer

#TestStatus
1init -> neutralok
2apply needs 5 stable samples (50 ms)ok
3release needs 5 stable samples (50 ms)ok
4bouncing input keeps current stateok
5both apply+release pressed -> neutralok

test_actuator_driver

#TestStatus
1init -> both actuators STOP, 0 mAok
2apply: invalid ID -> EINVALok
3apply: PWM > 100% -> EINVALok
4apply normal -> direction=APPLY, pwm=80ok
5release normal -> direction=RELEASEok
6ISR sample sets current_ma and peakok
7Overcurrent > 8 A for 100 ms -> STOP + overcurrent flagok
8Overcurrent < 100 ms does not trip yetok
9after overcurrent: subsequent apply -> EOVERCURRENTok
10Clamping force estimation from peak current (SWE-015)ok
11stop -> direction=STOP, pwm=0ok

test_apply_controller

#TestStatus
1init -> RELEASEDok
2step_50ms(NULL) -> last_error=EINVALok
3Apply request at standstill -> APPLYINGok
4Apply request without standstill is ignoredok
5APPLYING -> APPLIED when both clamping forces >= targetok
6APPLYING timeout (>30 steps) -> ERRORok
7APPLIED maintains clamping force (SWE-001)ok
8Release without engine is rejectedok
9Release with all preconditions -> RELEASING -> RELEASEDok
10Safety Manager apply request (Hill-Hold/Auto-Apply)ok
11Step counter increases monotonically (SWE-002 watchdog alive)ok
12ERROR -> RELEASED on neutral switchok

test_safety_manager

#TestStatus
1init -> IDLE, no apply requestok
2NULL input is a no-opok
3SWE-007: engine off + standstill -> AUTO_APPLY_ARMEDok
4SWE-008: after ~2s -> TRIGGERED + apply requestok
5Auto-Apply aborts when engine comes back onok
6AUTO_APPLY_TRIGGERED -> IDLE when Apply Controller is doneok
7SWE-009: grade >5% + standstill + brake -> HILL_HOLD_ARMEDok
8Hill-hold also on negative grade (downhill)ok
9Grade < 5% -> no hill-holdok
10SWE-010: brake released -> HILL_HOLD_ACTIVE + apply requestok
11HILL_HOLD_ACTIVE ends when vehicle rolls (v > 2 km/h)ok
12HILL_HOLD_ARMED -> IDLE when grade < 5%ok
13SWE-011 + SWE-012: intent + safety -> DRIVE_AWAY + release requestok
14SWE-012: door open blocks drive-awayok
15SWE-012: seatbelt not fastened blocks drive-awayok
16SWE-011: throttle < 10% does not trigger drive-awayok
17DRIVE_AWAY -> IDLE when Apply Controller has releasedok
18Already applied: no auto-apply armingok