mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-04 02:37:27 +02:00
* 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
21 lines
507 B
Bash
Executable File
21 lines
507 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# make sure we are in the right directory
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
cd $SCRIPT_DIR
|
|
|
|
set -eu
|
|
|
|
WORKERS="${PYTEST_WORKERS:-auto}"
|
|
|
|
if [ $# -lt 1 ]
|
|
then
|
|
if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
|
|
pytest --durations=30 -v -x -n "${WORKERS}" --dist=worksteal
|
|
else
|
|
pytest --durations=30 -v -x -n "${WORKERS}" --dist=worksteal -m "not slow"
|
|
fi
|
|
else
|
|
pytest --durations=30 -n "${WORKERS}" --dist=worksteal "$@"
|
|
fi
|