test models: add env var to filter out models

old-commit-hash: a009723513329921aafa6902ce320c3cc537729b
This commit is contained in:
Adeeb Shihadeh
2022-07-26 22:10:14 -07:00
parent e1f4ac8c31
commit 81389c508b
+5
View File
@@ -57,6 +57,11 @@ class TestCarModelBase(unittest.TestCase):
if cls.__name__ == 'TestCarModel' or cls.__name__.endswith('Base'):
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.car_model in non_tested_cars:
print(f"Skipping tests for {cls.car_model}: missing route")