carrot/panda/tests/hitl/8_misc.py
Vehicle Researcher d64fb1838d openpilot v0.9.7 release
date: 2024-06-11T01:36:39
master commit: f8cb04e4a8b032b72a909f68b808a50936184bee
2024-06-11 16:32:27 -07:00

14 lines
312 B
Python

import time
from panda import Panda
def test_boot_time(p):
# boot time should be instant
st = time.monotonic()
p.reset(reconnect=False)
assert Panda.wait_for_panda(p.get_usb_serial(), timeout=3.0)
# USB enumeration is slow, so SPI is faster
assert time.monotonic() - st < (1.0 if p.spi else 5.0)