mirror of https://github.com/commaai/openpilot.git
test models: skip with flag
This commit is contained in:
parent
85d8997a8a
commit
a55e25d9d2
|
@ -244,7 +244,8 @@ jobs:
|
|||
run: eval "$BUILD"
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
${{ env.RUN }} "scons -j$(nproc) --test && \
|
||||
${{ env.RUN }} "export SKIP_LONG_TESTS=1 && \
|
||||
scons -j$(nproc) --test && \
|
||||
$UNIT_TEST common && \
|
||||
$UNIT_TEST opendbc/can && \
|
||||
$UNIT_TEST selfdrive/boardd && \
|
||||
|
|
|
@ -43,11 +43,13 @@ 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, )))
|
||||
|
||||
SKIP_ENV_VAR = "SKIP_LONG_TESTS"
|
||||
|
||||
|
||||
@parameterized_class(('car_model', 'route'), test_cases)
|
||||
class TestCarModel(unittest.TestCase):
|
||||
|
||||
@unittest.skipUnless(__name__ == "__main__", "Long running test. Run individually.")
|
||||
@unittest.skipIf(SKIP_ENV_VAR in os.environ, f"Long running test skipped. Unset {SKIP_ENV_VAR} to run")
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
if cls.route is None:
|
||||
|
|
Loading…
Reference in New Issue