Files
llama.cpp/tools/server/tests/tests.sh
T

24 lines
575 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2024-02-24 12:28:55 +01:00
# make sure we are in the right directory
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
2024-02-24 12:28:55 +01:00
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
2024-02-24 12:28:55 +01:00
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
2024-02-24 12:28:55 +01:00
else
pytest --durations=30 "$@"
2024-02-24 12:28:55 +01:00
fi