summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-09-19 14:01:33 +0200
committerGitHub <noreply@github.com>2024-09-19 14:01:33 +0200
commitb1db22d406e18f95d85f7f4b0c23dfd0aac09a48 (patch)
tree8c33dfb9b3c822dd47b8872a80efd737e8e66397
parent7395656663d21f7c679f64fdee5892f62b96fa6f (diff)
downloadspack-b1db22d406e18f95d85f7f4b0c23dfd0aac09a48.tar.gz
spack-b1db22d406e18f95d85f7f4b0c23dfd0aac09a48.tar.bz2
spack-b1db22d406e18f95d85f7f4b0c23dfd0aac09a48.tar.xz
spack-b1db22d406e18f95d85f7f4b0c23dfd0aac09a48.zip
run-unit-tests: no xdist if coverage (#46480)
xdist only slows down unit tests under coverage
-rwxr-xr-xshare/spack/qa/run-unit-tests6
1 files changed, 3 insertions, 3 deletions
diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests
index ca9b0752f1..28e34a7120 100755
--- a/share/spack/qa/run-unit-tests
+++ b/share/spack/qa/run-unit-tests
@@ -47,7 +47,7 @@ $coverage_run $(which spack) python -c "import spack.pkg.builtin.mpileaks; repr(
# Run unit tests with code coverage
#-----------------------------------------------------------
# Check if xdist is available
-if python -m pytest -VV 2>&1 | grep xdist; then
+if [[ "$UNIT_TEST_COVERAGE" != "true" ]] && python -m pytest -VV 2>&1 | grep xdist; then
export PYTEST_ADDOPTS="$PYTEST_ADDOPTS --dist loadfile --tx '${SPACK_TEST_PARALLEL:=3}*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python'"
fi
@@ -61,9 +61,9 @@ fi
# where it seems that otherwise the configuration file might not be located by subprocesses
# in some, not better specified, cases.
if [[ "$UNIT_TEST_COVERAGE" == "true" ]]; then
- $(which spack) unit-test -x --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml
+ "$(which spack)" unit-test -x --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml
else
- $(which spack) unit-test -x --verbose
+ "$(which spack)" unit-test -x --verbose
fi