mirror of https://github.com/commaai/panda.git
boot time test (#1909)
* test * usb serial * just test for now * time * close * close after
This commit is contained in:
parent
de061e4f73
commit
8a845b973e
|
@ -82,7 +82,7 @@ pipeline {
|
|||
["build", "scons -j4"],
|
||||
["flash", "cd tests/ && ./reflash_internal_panda.py"],
|
||||
["flash jungle", "cd board/jungle && ./flash.py"],
|
||||
["test", "cd tests/hitl && HW_TYPES=6 pytest -n0 --durations=0 [2-7]*.py -k 'not test_send_recv'"],
|
||||
["test", "cd tests/hitl && HW_TYPES=6 pytest -n0 --durations=0 [2-9]*.py -k 'not test_send_recv'"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -433,6 +433,8 @@ class Panda:
|
|||
self._handle.controlWrite(Panda.REQUEST_IN, 0xd8, 0, 0, b'', timeout=timeout, expect_disconnect=True)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
self.close()
|
||||
if not enter_bootloader and reconnect:
|
||||
self.reconnect()
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
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)
|
||||
assert time.monotonic() - st < 3.0
|
Loading…
Reference in New Issue