server : use pytest-xdist for server tests (#28298)

* server : use pytest-xdist for server tests

This commit adds pytest-xdist to the server tests. This is pytest
plugin that distributes test execution across multiple CPU cores.

Assisted-by: pi:llama.cpp/qwen3.8-27B

Refs: https://github.com/ggml-org/llama.cpp/pull/26734#issuecomment-5220707042

* remove server_base_port and BASE_PORT

* use worksteal and pytest builting tmp_path
This commit is contained in:
Daniel Bevenius
2026-09-03 15:04:30 +02:00
committed by GitHub
parent de8656bd94
commit 42f0225fea
10 changed files with 36 additions and 26 deletions
+5 -3
View File
@@ -6,13 +6,15 @@ cd $SCRIPT_DIR
set -eu
WORKERS="${PYTEST_WORKERS:-auto}"
if [ $# -lt 1 ]
then
if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
pytest --durations=30 -v -x
pytest --durations=30 -v -x -n "${WORKERS}" --dist=worksteal
else
pytest --durations=30 -v -x -m "not slow"
pytest --durations=30 -v -x -n "${WORKERS}" --dist=worksteal -m "not slow"
fi
else
pytest --durations=30 "$@"
pytest --durations=30 -n "${WORKERS}" --dist=worksteal "$@"
fi