From 1e91cf92a180f7093279d19e4a8694c353910d15 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Thu, 9 Nov 2023 18:19:10 -0500 Subject: [PATCH] CI: codecov for multiprocessing (#30428) * concurrencty codecov * its a list * retrigger ci * increase delay --- .github/workflows/selfdrive_tests.yaml | 2 ++ pyproject.toml | 3 +++ selfdrive/athena/tests/test_athenad.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index bb5b0a137a..aba630f67c 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -213,6 +213,7 @@ jobs: run: | ${{ env.RUN }} "CI=1 coverage run selfdrive/test/process_replay/test_processes.py -j$(nproc) && \ chmod -R 777 /tmp/comma_download_cache && \ + coverage combine && \ coverage xml" - name: Print diff id: print-diff @@ -282,6 +283,7 @@ jobs: run: | ${{ env.RUN_CL }} "unset PYTHONWARNINGS && \ ONNXCPU=1 CI=1 NO_NAV=1 coverage run selfdrive/test/process_replay/model_replay.py && \ + coverage combine && \ coverage xml" - name: Run unit tests timeout-minutes: 4 diff --git a/pyproject.toml b/pyproject.toml index 71b677fbb7..16dad2c643 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -199,3 +199,6 @@ flake8-implicit-str-concat.allow-multiline=false "system".msg = "Use openpilot.system" "third_party".msg = "Use openpilot.third_party" "tools".msg = "Use openpilot.tools" + +[tool.coverage.run] +concurrency = ["multiprocessing", "thread"] \ No newline at end of file diff --git a/selfdrive/athena/tests/test_athenad.py b/selfdrive/athena/tests/test_athenad.py index e81753a6a0..6d3c5fdb33 100755 --- a/selfdrive/athena/tests/test_athenad.py +++ b/selfdrive/athena/tests/test_athenad.py @@ -87,7 +87,7 @@ class TestAthenadMethods(unittest.TestCase): p = Process(target=send_deviceState) p.start() - time.sleep(0.1) + time.sleep(0.2) try: deviceState = dispatcher["getMessage"]("deviceState") assert deviceState['deviceState']