From c2500aa3917a29361dd15dd77e130660c69e070b Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 29 Jan 2025 14:54:36 +0000 Subject: [PATCH] Use xdist for serial tests (#3996) * Use pytest-xdist for serial tests so output is collated * lint * fixup * fixup * fixup * undo tee-ing * another try --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f17161362..1a79936f0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,13 +96,15 @@ jobs: sudo apt -y install parallel . ../firedrake_venv/bin/activate python "$(which firedrake-clean)" - python -m pip install pytest-timeout ipympl pytest-split + python -m pip install pytest-timeout ipympl pytest-split pytest-xdist python -m pip list - name: Run tests (nprocs = 1) run: | + : # Use pytest-xdist here so we can have a single collated output (not possible + : # for parallel tests) . ../firedrake_venv/bin/activate - firedrake-run-split-tests 1 12 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake1_{#}.xml" + firedrake-run-split-tests 1 1 "-n 12 $EXTRA_PYTEST_ARGS --junit-xml=firedrake1_{#}.xml" - name: Run tests (nprocs = 2) # Run even if earlier tests failed