From c13e16311eb882df65d216bbd59acb5702e985e6 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 2 Jan 2024 15:38:51 -0800 Subject: [PATCH] not sure why this is a test --- selfdrive/car/tests/test_models.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index 7306962fa6..32d1ef9240 100755 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -38,6 +38,7 @@ INTERNAL_SEG_CNT = int(os.environ.get("INTERNAL_SEG_CNT", "0")) MAX_EXAMPLES = int(os.environ.get("MAX_EXAMPLES", "50")) CI = os.environ.get("CI", None) is not None +print(CI) def get_test_cases() -> List[Tuple[str, Optional[CarTestRoute]]]: # build list of test cases @@ -68,7 +69,6 @@ def get_test_cases() -> List[Tuple[str, Optional[CarTestRoute]]]: class TestCarModelBase(unittest.TestCase): car_model: Optional[str] = None test_route: Optional[CarTestRoute] = None - test_route_on_bucket: bool = True # whether the route is on the preserved CI bucket can_msgs: List[capnp.lib.capnp._DynamicStructReader] fingerprint: dict[int, dict[int, int]] @@ -85,7 +85,9 @@ class TestCarModelBase(unittest.TestCase): try: return LogReader(get_url(cls.test_route.route, seg)) except Exception: - cls.test_route_on_bucket = False + if CI: + raise Exception("Route not on CI bucket. " + + "This is fine to fail for WIP car ports, just let us know and we can upload your routes to the CI bucket.") # Fallback to public route, which will fail the test_route_on_ci_bucket when running in CI try: @@ -466,11 +468,6 @@ class TestCarModelBase(unittest.TestCase): failed_checks = {k: v for k, v in checks.items() if v > 0} self.assertFalse(len(failed_checks), f"panda safety doesn't agree with openpilot: {failed_checks}") - @pytest.mark.skipif(not CI, reason="When running in CI we want to make sure all the routes are uploaded to the preserved CI bucket.") - def test_route_on_ci_bucket(self): - assert self.test_route_on_bucket, "Route not on CI bucket. \ - This is fine to fail for WIP car ports, just let us know and we can upload your routes to the CI bucket." - @parameterized_class(('car_model', 'test_route'), get_test_cases()) @pytest.mark.xdist_group_class_property('test_route')