summaryrefslogtreecommitdiff
path: root/llama.cpp/tools/server/tests/tests.sh
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-02-12 20:57:17 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-02-12 20:57:17 +0100
commitb333b06772c89d96aacb5490d6a219fba7c09cc6 (patch)
tree211df60083a5946baa2ed61d33d8121b7e251b06 /llama.cpp/tools/server/tests/tests.sh
downloadllmnpc-b333b06772c89d96aacb5490d6a219fba7c09cc6.tar.gz
Engage!
Diffstat (limited to 'llama.cpp/tools/server/tests/tests.sh')
-rwxr-xr-xllama.cpp/tools/server/tests/tests.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/llama.cpp/tools/server/tests/tests.sh b/llama.cpp/tools/server/tests/tests.sh
new file mode 100755
index 0000000..709b584
--- /dev/null
+++ b/llama.cpp/tools/server/tests/tests.sh
@@ -0,0 +1,23 @@
+#!/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 -v -x
+ else
+ pytest -v -x -m "not slow"
+ fi
+else
+ pytest "$@"
+fi