  
  # build list of test cases
  routes_by_car = defaultdict(set)
  for r in routes:
    routes_by_car[r.car_fingerprint].add(r)
  
  test_cases: List[Tuple[str, Optional[TestRoute]]] = []
  for i, c in enumerate(sorted(all_known_cars())):
    if i % NUM_JOBS == JOB_ID:
      test_cases.extend((c, r) for r in routes_by_car.get(c, (None, )))
 
</s> remove         lr = LogReader(get_url(cls.test_route.route, seg))
 </s> add         if cls.ci:
          lr = LogReader(get_url(cls.test_route.route, seg))
        else:
          lr = LogReader(Route(cls.test_route.route).log_paths()[seg]) </s> remove @parameterized_class(('car_model', 'test_route'), test_cases)
class TestCarModel(unittest.TestCase):
 </s> add class TestCarModelBase(unittest.TestCase):
  car_model = None
  test_route = None
  ci = True </s> remove TestRoute = namedtuple('TestRoute', ['route', 'car_fingerprint', 'segment'], defaults=(None,))
 </s> add TestRoute = namedtuple('TestRoute', ['route', 'car_model', 'segment'], defaults=(None,))
  routes_by_car[r.car_model].add(r)
  
  # build list of test cases
  routes_by_car = defaultdict(set)
  for r in routes:
  routes_by_car[r.car_model].add(r)
  
  test_cases: List[Tuple[str, Optional[TestRoute]]] = []
  for i, c in enumerate(sorted(all_known_cars())):
    if i % NUM_JOBS == JOB_ID:
      test_cases.extend((c, r) for r in routes_by_car.get(c, (None, )))
keep keep keep keep replace keep keep keep keep keep
 test_models: support for running on any route (#24002)

* run test_models on route

* clean up a bit

clean up a bit

clean up a bit

* remove

remove

* make route positional

* fixes from merge

* not working as I expected

* finally working, easiest way seems to make a new subclass dynamically

* bring back routes

* remove comments

* revert skiptest

* fix subclass name

* car first

* this should be here...

* this should work

* comment

* pytest doesn't support dynamically loading with load_tests

* minimize test_models.py diff, and make new file for running on a route

* fix static analysis

* remove print

* clean up a tiny bit

* rename and make required

* auto detect car fingerprint if not given

* move to location that makes more sense

* Add ci argument for running route from routes.py 
selfdrive/car/tests/test_models.py