diff --git a/Jenkinsfile b/Jenkinsfile index 5e9efc478f..93926566aa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -208,7 +208,6 @@ node { step("build openpilot", "cd system/manager && ./build.py"), step("check dirty", "release/check-dirty.sh"), step("onroad tests", "pytest selfdrive/test/test_onroad.py -s", [timeout: 60]), - //["time to onroad", "pytest selfdrive/test/test_time_to_onroad.py"], ]) }, 'HW + Unit Tests': { diff --git a/conftest.py b/conftest.py index 7ee0c78943..a14a33c37d 100644 --- a/conftest.py +++ b/conftest.py @@ -14,7 +14,6 @@ collect_ignore = [ "selfdrive/ui/tests/test_translations", "selfdrive/test/process_replay/test_processes.py", "selfdrive/test/process_replay/test_regen.py", - "selfdrive/test/test_time_to_onroad.py", ] collect_ignore_glob = [ "selfdrive/debug/*.py", diff --git a/selfdrive/test/test_time_to_onroad.py b/selfdrive/test/test_time_to_onroad.py deleted file mode 100644 index e68386bb58..0000000000 --- a/selfdrive/test/test_time_to_onroad.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import pytest -import time -import subprocess - -from cereal import log -import cereal.messaging as messaging -from openpilot.common.basedir import BASEDIR -from openpilot.common.timeout import Timeout -from openpilot.selfdrive.test.helpers import set_params_enabled - -EventName = log.OnroadEvent.EventName - - -@pytest.mark.tici -def test_time_to_onroad(): - # launch - set_params_enabled() - manager_path = os.path.join(BASEDIR, "system/manager/manager.py") - proc = subprocess.Popen(["python", manager_path]) - - start_time = time.monotonic() - sm = messaging.SubMaster(['selfdriveState', 'deviceState', 'onroadEvents']) - try: - # wait for onroad. timeout assumes panda is up to date - with Timeout(10, "timed out waiting to go onroad"): - while not sm['deviceState'].started: - sm.update(100) - - # wait for engageability - try: - with Timeout(10, "timed out waiting for engageable"): - initialized = False - while True: - sm.update(100) - - if sm.seen['onroadEvents'] and not any(EventName.selfdriveInitializing == e.name for e in sm['onroadEvents']): - initialized = True - - if initialized: - sm.update(100) - assert sm['selfdriveState'].engageable, f"events: {sm['onroadEvents']}" - break - finally: - print(f"onroad events: {sm['onroadEvents']}") - print(f"engageable after {time.monotonic() - start_time:.2f}s") - - # once we're enageable, must stay for the next few seconds - st = time.monotonic() - while (time.monotonic() - st) < 10.: - sm.update(100) - assert sm.all_alive(), sm.alive - assert sm['selfdriveState'].engageable, f"events: {sm['onroadEvents']}" - finally: - proc.terminate() - if proc.wait(20) is None: - proc.kill()