diff --git a/Jenkinsfile b/Jenkinsfile index 09c893268b..392253e845 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -272,9 +272,8 @@ node { 'car tests': { pcStage("car tests") { sh label: "build", script: "selfdrive/manager/build.py" - sh label: "test_models", script: "INTERNAL_SEG_CNT=300 FILEREADER_CACHE=1 INTERNAL_SEG_LIST=selfdrive/car/tests/test_models_segs.txt \ - pytest selfdrive/car/tests/test_models.py" - sh label: "test_car_interfaces", script: "MAX_EXAMPLES=300 pytest selfdrive/car/tests/test_car_interfaces.py" + sh label: "run car tests", script: "cd selfdrive/car/tests && MAX_EXAMPLES=300 INTERNAL_SEG_CNT=300 FILEREADER_CACHE=1 \ + INTERNAL_SEG_LIST=selfdrive/car/tests/test_models_segs.txt pytest test_models.py test_car_interfaces.py" } }, diff --git a/conftest.py b/conftest.py index e215bb8b4c..544025e180 100644 --- a/conftest.py +++ b/conftest.py @@ -1,3 +1,4 @@ +import gc import os import pytest import random @@ -45,6 +46,11 @@ def openpilot_function_fixture(request): # cleanup any started processes manager.manager_cleanup() + # some processes disable gc for performance, re-enable here + if not gc.isenabled(): + gc.enable() + gc.collect() + # If you use setUpClass, the environment variables won't be cleared properly, # so we need to hook both the function and class pytest fixtures @pytest.fixture(scope="class", autouse=True)