Skip to content

Commit

Permalink
jenkins: run bootkick tests (#1688)
Browse files Browse the repository at this point in the history
* jenkins: run bootkick tests

* flip that

* little longer

* increase

* disable can

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
  • Loading branch information
adeebshihadeh and Bruce Wayne authored Oct 10, 2023
1 parent aaa1172 commit 7b32341
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ pipeline {
}
}
}
stage('bootkick tests') {
steps {
script {
docker_run("test", 10, "pytest ./tests/som/test_bootkick.py")
}
}
}

/*
stage('pedal tests') {
steps {
Expand Down
2 changes: 1 addition & 1 deletion tests/hitl/reset_jungles.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def flash(s):
r.cycle_power(ports=[1, 2])

serials = PandaJungle.list()
assert set(PandaJungle.list()) <= SERIALS
assert set(PandaJungle.list()) >= SERIALS
mcu_types = list(exc.map(flash, SERIALS, timeout=20))
assert set(mcu_types) == {McuType.F4, McuType.H7}
5 changes: 3 additions & 2 deletions tests/som/test_booting.py → tests/som/test_bootkick.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def wait_for_som_shutdown(panda, jungle):
def wait_for_full_poweroff(jungle, timeout=30):
st = time.monotonic()

time.sleep(5)
time.sleep(15)
while PANDA_SERIAL in Panda.list():
if time.monotonic() - st > timeout:
raise Exception("took too long for device to turn off")
Expand All @@ -78,7 +78,7 @@ def check_som_boot_flag(panda):
h = panda.health()
return h['safety_mode'] == Panda.SAFETY_ELM327 and h['safety_param'] == 30

def wait_for_boot(panda, jungle, bootkick=False, timeout=60):
def wait_for_boot(panda, jungle, bootkick=False, timeout=120):
st = time.monotonic()

Panda.wait_for_panda(PANDA_SERIAL, timeout)
Expand Down Expand Up @@ -109,6 +109,7 @@ def test_bootkick_ignition_line(p, pj):
pj.set_ignition(True)
wait_for_boot(p, pj, bootkick=True)

@pytest.mark.skip("test isn't reliable yet")
def test_bootkick_can_ignition(p, pj):
setup_state(p, pj, "ready to bootkick")
for _ in range(10):
Expand Down

0 comments on commit 7b32341

Please sign in to comment.