From 628e0daee034ff42e5e9f59a445c77c577daa3f3 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 28 Oct 2024 15:00:59 -0700 Subject: [PATCH] tici: remove power save test, it's testing the wrong thing --- Jenkinsfile | 1 - system/hardware/tici/tests/test_hardware.py | 26 --------------------- 2 files changed, 27 deletions(-) delete mode 100644 system/hardware/tici/tests/test_hardware.py diff --git a/Jenkinsfile b/Jenkinsfile index 64b2f05758..5afffad48f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -232,7 +232,6 @@ node { ["test pandad spi", "pytest selfdrive/pandad/tests/test_pandad_spi.py"], ["test pandad", "pytest selfdrive/pandad/tests/test_pandad.py", ["panda/", "selfdrive/pandad/"]], ["test amp", "pytest system/hardware/tici/tests/test_amplifier.py"], - ["test hw", "pytest system/hardware/tici/tests/test_hardware.py"], ["test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py"], ]) }, diff --git a/system/hardware/tici/tests/test_hardware.py b/system/hardware/tici/tests/test_hardware.py deleted file mode 100644 index 75f53e7cdb..0000000000 --- a/system/hardware/tici/tests/test_hardware.py +++ /dev/null @@ -1,26 +0,0 @@ -import pytest -import time -import numpy as np - -from openpilot.system.hardware.tici.hardware import Tici - -HARDWARE = Tici() - - -@pytest.mark.tici -class TestHardware: - - def test_power_save_time(self): - ts = {True: [], False: []} - for _ in range(5): - for on in (True, False): - st = time.monotonic() - HARDWARE.set_power_save(on) - ts[on].append(time.monotonic() - st) - - # disabling power save is the main time-critical one - assert 0.1 < np.mean(ts[False]) < 0.15 - assert max(ts[False]) < 0.2 - - assert 0.1 < np.mean(ts[True]) < 0.35 - assert max(ts[True]) < 0.4