add extra debug info to onroad test (#30067)

old-commit-hash: fa06a69101
test-msgs
Adeeb Shihadeh 2 years ago committed by GitHub
parent 9d4767bd87
commit 0358e2c547
  1. 4
      selfdrive/test/test_time_to_onroad.py

@ -16,7 +16,7 @@ def test_time_to_onroad():
proc = subprocess.Popen(["python", manager_path]) proc = subprocess.Popen(["python", manager_path])
start_time = time.monotonic() start_time = time.monotonic()
sm = messaging.SubMaster(['controlsState', 'deviceState']) sm = messaging.SubMaster(['controlsState', 'deviceState', 'carEvents'])
try: try:
# wait for onroad # wait for onroad
with Timeout(20, "timed out waiting to go onroad"): with Timeout(20, "timed out waiting to go onroad"):
@ -38,7 +38,7 @@ def test_time_to_onroad():
# once we're enageable, must be for the next few seconds # once we're enageable, must be for the next few seconds
for _ in range(500): for _ in range(500):
sm.update(100) sm.update(100)
assert sm['controlsState'].engageable assert sm['controlsState'].engageable, f"events: {sm['carEvents']}"
finally: finally:
proc.terminate() proc.terminate()
if proc.wait(60) is None: if proc.wait(60) is None:

Loading…
Cancel
Save