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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user