More startup checks (#31511)

* no lag!

* kill first

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 1145122b3f
chrysler-long2
Adeeb Shihadeh 1 year ago committed by GitHub
parent 284450400e
commit 01945d439f
  1. 4
      selfdrive/manager/process.py
  2. 1
      selfdrive/test/test_time_to_onroad.py

@ -281,11 +281,13 @@ def ensure_running(procs: ValuesView[ManagerProcess], started: bool, params=None
running = []
for p in procs:
if p.enabled and p.name not in not_run and p.should_run(started, params, CP):
p.start()
running.append(p)
else:
p.stop(block=False)
p.check_watchdog(started)
for p in running:
p.start()
return running

@ -50,6 +50,7 @@ def test_time_to_onroad():
sm.update(100)
assert sm.all_alive(), sm.alive
assert sm['controlsState'].engageable, f"events: {sm['onroadEvents']}"
assert sm['controlsState'].cumLagMs < 10.
finally:
proc.terminate()
if proc.wait(20) is None:

Loading…
Cancel
Save