From 6be9e6607331f15ee6815fa6fbd367596f799548 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 14 Aug 2023 16:08:34 -0700 Subject: [PATCH] jenkins: re-enable test_models (#29394) * re-enable test_models * now? * Remove bad Volt segment * Update Jenkinsfile * use first n segments old-commit-hash: fb235238addb73e04f59fca941040e3785be103e --- Jenkinsfile | 3 ++- selfdrive/car/tests/test_models.py | 6 +++++- selfdrive/car/tests/test_models_segs.txt | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c0de022efe..cd5a11ef06 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -158,7 +158,8 @@ pipeline { sh "git lfs pull" // tests that our build system's dependencies are configured properly, needs a machine with lots of cores sh "scons --clean && scons --no-cache --random -j42" - //sh "INTERNAL_SEG_LIST=selfdrive/car/tests/test_models_segs.txt FILEREADER_CACHE=1 pytest -n42 --dist=loadscope selfdrive/car/tests/test_models.py" + sh "INTERNAL_SEG_CNT=400 INTERNAL_SEG_LIST=selfdrive/car/tests/test_models_segs.txt FILEREADER_CACHE=1 \ + pytest -n42 --dist=loadscope selfdrive/car/tests/test_models.py" } post { diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index b7b8900461..103ee36273 100755 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -27,6 +27,7 @@ PandaType = log.PandaState.PandaType NUM_JOBS = int(os.environ.get("NUM_JOBS", "1")) JOB_ID = int(os.environ.get("JOB_ID", "0")) INTERNAL_SEG_LIST = os.environ.get("INTERNAL_SEG_LIST", "") +INTERNAL_SEG_CNT = int(os.environ.get("INTERNAL_SEG_CNT", "0")) ignore_addr_checks_valid = [ GM.BUICK_REGAL, @@ -48,7 +49,10 @@ def get_test_cases(): else: with open(os.path.join(BASEDIR, INTERNAL_SEG_LIST), "r") as f: - seg_list = iter(f.read().splitlines()) + seg_list = f.read().splitlines() + + cnt = INTERNAL_SEG_CNT or len(seg_list) + seg_list = iter(seg_list[:cnt]) for platform in seg_list: platform = platform[2:] # get rid of comment diff --git a/selfdrive/car/tests/test_models_segs.txt b/selfdrive/car/tests/test_models_segs.txt index 68841af007..62ac21f1a6 100644 --- a/selfdrive/car/tests/test_models_segs.txt +++ b/selfdrive/car/tests/test_models_segs.txt @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:636df10e41e8c6668678a3aa7098afad8c160ea7b75c5a0473f6709db1c702dc -size 39373 +oid sha256:cab947c2a63a4ce7738e5396f2699335e7369cf8b215bf3cb4db072ba8ca6f65 +size 39302