From c7889a16beb95eed868d51b1c5fd2e365b97d747 Mon Sep 17 00:00:00 2001 From: Maxime Desroches Date: Fri, 6 Dec 2024 17:06:48 -0800 Subject: [PATCH] ci: remove the old `phone_only` test marker (#34168) * std * ruff --- selfdrive/pandad/tests/test_pandad_loopback.py | 3 +-- selfdrive/pandad/tests/test_pandad_spi.py | 3 +-- selfdrive/test/helpers.py | 9 --------- system/camerad/test/test_exposure.py | 5 +++-- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/selfdrive/pandad/tests/test_pandad_loopback.py b/selfdrive/pandad/tests/test_pandad_loopback.py index 0f41201ece..bf1c557128 100644 --- a/selfdrive/pandad/tests/test_pandad_loopback.py +++ b/selfdrive/pandad/tests/test_pandad_loopback.py @@ -14,7 +14,7 @@ from openpilot.common.params import Params from openpilot.common.timeout import Timeout from openpilot.selfdrive.pandad import can_list_to_can_capnp from openpilot.system.hardware import TICI -from openpilot.selfdrive.test.helpers import phone_only, with_processes +from openpilot.selfdrive.test.helpers import with_processes @retry(attempts=3) @@ -72,7 +72,6 @@ class TestBoarddLoopback: os.environ['STARTED'] = '1' os.environ['BOARDD_LOOPBACK'] = '1' - @phone_only @with_processes(['pandad']) def test_loopback(self): num_pandas = 2 if TICI and "SINGLE_PANDA" not in os.environ else 1 diff --git a/selfdrive/pandad/tests/test_pandad_spi.py b/selfdrive/pandad/tests/test_pandad_spi.py index 9c5990cd3f..9f7cc3b029 100644 --- a/selfdrive/pandad/tests/test_pandad_spi.py +++ b/selfdrive/pandad/tests/test_pandad_spi.py @@ -7,7 +7,7 @@ import random import cereal.messaging as messaging from cereal.services import SERVICE_LIST from openpilot.system.hardware import HARDWARE -from openpilot.selfdrive.test.helpers import phone_only, with_processes +from openpilot.selfdrive.test.helpers import with_processes from openpilot.selfdrive.pandad.tests.test_pandad_loopback import setup_pandad, send_random_can_messages JUNGLE_SPAM = "JUNGLE_SPAM" in os.environ @@ -23,7 +23,6 @@ class TestBoarddSpi: if not JUNGLE_SPAM: os.environ['BOARDD_LOOPBACK'] = '1' - @phone_only @with_processes(['pandad']) def test_spi_corruption(self, subtests): setup_pandad(1) diff --git a/selfdrive/test/helpers.py b/selfdrive/test/helpers.py index b7f5bb183b..81635aa31f 100644 --- a/selfdrive/test/helpers.py +++ b/selfdrive/test/helpers.py @@ -10,7 +10,6 @@ from functools import wraps import cereal.messaging as messaging from openpilot.common.params import Params from openpilot.system.manager.process_config import managed_processes -from openpilot.system.hardware import PC from openpilot.system.version import training_version, terms_version @@ -29,14 +28,6 @@ def set_params_enabled(): msg.liveCalibration.rpyCalib = [0.0, 0.0, 0.0] params.put("CalibrationParams", msg.to_bytes()) -def phone_only(f): - @wraps(f) - def wrap(self, *args, **kwargs): - if PC: - pytest.skip("This test is not meant to run on PC") - return f(self, *args, **kwargs) - return wrap - def release_only(f): @wraps(f) def wrap(self, *args, **kwargs): diff --git a/system/camerad/test/test_exposure.py b/system/camerad/test/test_exposure.py index dbe6f3d880..97f03ed182 100644 --- a/system/camerad/test/test_exposure.py +++ b/system/camerad/test/test_exposure.py @@ -1,12 +1,14 @@ import time import numpy as np +import pytest -from openpilot.selfdrive.test.helpers import with_processes, phone_only +from openpilot.selfdrive.test.helpers import with_processes from openpilot.system.camerad.snapshot.snapshot import get_snapshots TEST_TIME = 45 REPEAT = 5 +@pytest.mark.tici class TestCamerad: @classmethod def setup_class(cls): @@ -28,7 +30,6 @@ class TestCamerad: print([i_median, i_mean]) return med_ex[0] < i_median < med_ex[1] and mean_ex[0] < i_mean < mean_ex[1] - @phone_only @with_processes(['camerad']) def test_camera_operation(self): passed = 0