mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
* Commands to get signature from panda * does this make misra happy? * Can I do this in misra? * this works and makes misra happy * Add jenkins test for get signature * Remove comments * Add comment about code size * Fix firmware file path
35 lines
666 B
Python
35 lines
666 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")
|
|
|
|
firmware_sig = Panda.get_signature_from_firmware(fn)
|
|
panda_sig = p.get_signature()
|
|
|
|
assert_equal(panda_sig, firmware_sig)
|