summaryrefslogtreecommitdiff
path: root/share/spack/qa/run-unit-tests
diff options
context:
space:
mode:
Diffstat (limited to 'share/spack/qa/run-unit-tests')
-rwxr-xr-xshare/spack/qa/run-unit-tests5
1 files changed, 5 insertions, 0 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"