run-unit-tests: no xdist if coverage (#46480)
xdist only slows down unit tests under coverage
This commit is contained in:
parent
683e50b8d9
commit
1538c48616
1 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ if [[ "$SPACK_TEST_SOLVER" == "original" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if xdist is available
|
# 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'"
|
export PYTEST_ADDOPTS="$PYTEST_ADDOPTS --dist loadfile --tx '${SPACK_TEST_PARALLEL:=3}*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -66,9 +66,9 @@ fi
|
||||||
# where it seems that otherwise the configuration file might not be located by subprocesses
|
# where it seems that otherwise the configuration file might not be located by subprocesses
|
||||||
# in some, not better specified, cases.
|
# in some, not better specified, cases.
|
||||||
if [[ "$UNIT_TEST_COVERAGE" == "true" ]]; then
|
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
|
else
|
||||||
$(which spack) unit-test -x --verbose
|
"$(which spack)" unit-test -x --verbose
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue