test models: add env var to filter out models

pull/25296/head
Adeeb Shihadeh 3 years ago
parent 7700a6c1e6
commit a009723513
  1. 5
      selfdrive/car/tests/test_models.py

@ -57,6 +57,11 @@ class TestCarModelBase(unittest.TestCase):
if cls.__name__ == 'TestCarModel' or cls.__name__.endswith('Base'): if cls.__name__ == 'TestCarModel' or cls.__name__.endswith('Base'):
raise unittest.SkipTest raise unittest.SkipTest
if 'FILTER' in os.environ:
print(tuple(os.environ.get('FILTER').split(', ')))
if not cls.car_model.startswith(tuple(os.environ.get('FILTER').split(','))):
raise unittest.SkipTest
if cls.test_route is None: if cls.test_route is None:
if cls.car_model in non_tested_cars: if cls.car_model in non_tested_cars:
print(f"Skipping tests for {cls.car_model}: missing route") print(f"Skipping tests for {cls.car_model}: missing route")

Loading…
Cancel
Save