koboldcpp/tools/server/tests/tests.sh
Georgi Gerganov 1621a3d388
tests : speed-up server test suite 3x (#26734)
* tests : speed-up test suite 3x

* cont : print 30 slowest tests
2026-08-07 21:38:32 +03:00

23 lines
575 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
if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
# Slow tests for tool calls need quite a few models ahead of time to avoid timing out.
python $SCRIPT_DIR/../../../scripts/fetch_server_test_models.py
fi
if [ $# -lt 1 ]
then
if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
pytest --durations=30 -v -x
else
pytest --durations=30 -v -x -m "not slow"
fi
else
pytest --durations=30 "$@"
fi