From 4170534c02f2c7681ccc04bc7b67936181320965 Mon Sep 17 00:00:00 2001 From: Maxime Desroches Date: Tue, 12 Nov 2024 14:26:21 -0800 Subject: [PATCH] ci: faster process_replay (#33989) * try * fix * try * try * try * monitor * no * how fast * more * timeout * remove * ruff * try * less * cons * less * cons * revert * more and less * more? * more? * cons * cons * cons * cons * cons --- .github/workflows/selfdrive_tests.yaml | 2 +- selfdrive/controls/controlsd.py | 2 +- selfdrive/test/process_replay/test_processes.py | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 509e4e2f3..fc12d2b92 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -210,7 +210,7 @@ jobs: run: | ${{ env.RUN }} "scons -j$(nproc)" - name: Run replay - timeout-minutes: 30 + timeout-minutes: ${{ contains(runner.name, 'nsc') && 1 || 20 }} run: | ${{ env.RUN }} "coverage run selfdrive/test/process_replay/test_processes.py -j$(nproc) && \ chmod -R 777 /tmp/comma_download_cache && \ diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index c97a06a0c..64be43408 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -209,7 +209,7 @@ class Controls: self.update() CC, lac_log = self.state_control() self.publish(CC, lac_log) - rk.keep_time() + rk.monitor_time() def main(): config_realtime_process(4, Priority.CTRL_HIGH) diff --git a/selfdrive/test/process_replay/test_processes.py b/selfdrive/test/process_replay/test_processes.py index 4f0705f49..170daf6c1 100755 --- a/selfdrive/test/process_replay/test_processes.py +++ b/selfdrive/test/process_replay/test_processes.py @@ -193,6 +193,10 @@ if __name__ == "__main__": if cfg.proc_name not in tested_procs: continue + # to speed things up, we only test all segments on card + if cfg.proc_name != 'card' and car_brand not in ['HYUNDAI', 'TOYOTA', 'HONDA', 'SUBARU', 'FORD']: + continue + cur_log_fn = os.path.join(FAKEDATA, f"{segment}_{cfg.proc_name}_{cur_commit}.zst") if args.update_refs: # reference logs will not exist if routes were just regenerated ref_log_path = get_url(*segment.rsplit("--", 1,), "rlog.zst")