summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/qa/run-unit-tests5
-rwxr-xr-xshare/spack/spack-completion.bash2
2 files changed, 6 insertions, 1 deletions
diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests
index 6222cbccd9..62cca273bf 100755
--- a/share/spack/qa/run-unit-tests
+++ b/share/spack/qa/run-unit-tests
@@ -54,6 +54,11 @@ elif [[ "$SPACK_TEST_SOLVER" == "original" ]]; then
export PYTEST_ADDOPTS='-m "not maybeslow"'
fi
+# Check if xdist is available
+if python -m pytest --trace-config 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
+
$coverage_run $(which spack) unit-test -x --verbose
bash "$QA_DIR/test-env-cfg.sh"
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash
index bde48d8e97..c91b888f09 100755
--- a/share/spack/spack-completion.bash
+++ b/share/spack/spack-completion.bash
@@ -1568,7 +1568,7 @@ _spack_pydoc() {
_spack_python() {
if $list_options
then
- SPACK_COMPREPLY="-h --help -V --version -c -i -m --path"
+ SPACK_COMPREPLY="-h --help -V --version -c -u -i -m --path"
else
SPACK_COMPREPLY=""
fi