From 6fc14b5b9398a5c60239202102ef4a1923046e33 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sat, 2 Nov 2024 07:35:39 +0800 Subject: [PATCH] selfdrive/debug: fix broken check_can_parser_performance.py (#33908) * fix check_can_parser_performance.py * no difference * this too --------- Co-authored-by: Shane Smiskol --- selfdrive/car/tests/test_models.py | 2 +- selfdrive/debug/check_can_parser_performance.py | 1 - tools/car_porting/test_car_model.py | 7 +++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index 2a621277495ebb..e1e89abf9c9167 100644 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -93,7 +93,7 @@ def get_testing_data_from_logreader(cls, lr): car_fw = msg.carParams.carFw if msg.carParams.openpilotLongitudinalControl: experimental_long = True - if cls.platform is None and not cls.test_route_on_bucket: + if cls.platform is None: live_fingerprint = msg.carParams.carFingerprint cls.platform = MIGRATION.get(live_fingerprint, live_fingerprint) diff --git a/selfdrive/debug/check_can_parser_performance.py b/selfdrive/debug/check_can_parser_performance.py index 2bddd362ae792e..7a0db1926bfb17 100755 --- a/selfdrive/debug/check_can_parser_performance.py +++ b/selfdrive/debug/check_can_parser_performance.py @@ -14,7 +14,6 @@ class CarModelTestCase(TestCarModelBase): test_route = CarTestRoute(DEMO_ROUTE, None) - ci = False if __name__ == '__main__': diff --git a/tools/car_porting/test_car_model.py b/tools/car_porting/test_car_model.py index 7ed7ba4f4d762d..dd248f562e59e7 100755 --- a/tools/car_porting/test_car_model.py +++ b/tools/car_porting/test_car_model.py @@ -8,11 +8,11 @@ from openpilot.tools.lib.route import SegmentRange -def create_test_models_suite(routes: list[CarTestRoute], ci=False) -> unittest.TestSuite: +def create_test_models_suite(routes: list[CarTestRoute]) -> unittest.TestSuite: test_suite = unittest.TestSuite() for test_route in routes: # create new test case and discover tests - test_case_args = {"platform": test_route.car_model, "test_route": test_route, "test_route_on_bucket": ci} + test_case_args = {"platform": test_route.car_model, "test_route": test_route} CarModelTestCase = type("CarModelTestCase", (TestCarModel,), test_case_args) test_suite.addTest(unittest.TestLoader().loadTestsFromTestCase(CarModelTestCase)) return test_suite @@ -23,7 +23,6 @@ def create_test_models_suite(routes: list[CarTestRoute], ci=False) -> unittest.T "Uses selfdrive/car/tests/test_models.py") parser.add_argument("route_or_segment_name", help="Specify route to run tests on") parser.add_argument("--car", help="Specify car model for test route") - parser.add_argument("--ci", action="store_true", help="Attempt to get logs using openpilotci, need to specify car") args = parser.parse_args() if len(sys.argv) == 1: parser.print_help() @@ -32,6 +31,6 @@ def create_test_models_suite(routes: list[CarTestRoute], ci=False) -> unittest.T sr = SegmentRange(args.route_or_segment_name) test_routes = [CarTestRoute(sr.route_name, args.car, segment=seg_idx) for seg_idx in sr.seg_idxs] - test_suite = create_test_models_suite(test_routes, ci=args.ci) + test_suite = create_test_models_suite(test_routes) unittest.TextTestRunner().run(test_suite)