Files
panda-meb/tests/automated/1_program.py
Willem Melching ad9ecefe65 Switch panda to scons builder (#635)
* add scons builder

* cleanup 1

* remove building from python code

* add pedal build

* fixup flags

* add EON flag

* change github actions to scons

* fixup automated tests

* move flashing scripts

* fix indent

* remove version.mk

* fix not in git

* fix linker script filename

* untested pedal flashing scripts

* add release option

* better asserts

* swap condition

* enable usb and fix flash script

* usb flash is not supported

* use button to enable dfu mode

* no usb because misra

* remove sleep
2021-03-24 14:44:32 +01:00

35 lines
673 B
Python

import os
from nose.tools import assert_equal
from panda import Panda, BASEDIR
from .helpers import reset_pandas, test_all_pandas, panda_connect_and_init
# Reset the pandas before flashing them
def aaaa_reset_before_tests():
reset_pandas()
@test_all_pandas
@panda_connect_and_init
def test_recover(p):
assert p.recover(timeout=30)
@test_all_pandas
@panda_connect_and_init
def test_flash(p):
p.flash()
@test_all_pandas
@panda_connect_and_init
def test_get_signature(p):
fn = os.path.join(BASEDIR, "board/obj/panda.bin.signed")
firmware_sig = Panda.get_signature_from_firmware(fn)
panda_sig = p.get_signature()
assert_equal(panda_sig, firmware_sig)