2024-02-24 12:28:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-12-06 11:14:32 +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
|
|
|
|
|
2025-01-30 20:13:58 +01:00
|
|
|
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
|
2025-01-30 20:13:58 +01:00
|
|
|
if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
|
|
|
|
pytest -v -x
|
|
|
|
else
|
|
|
|
pytest -v -x -m "not slow"
|
|
|
|
fi
|
2024-02-24 12:28:55 +01:00
|
|
|
else
|
2024-11-26 16:20:18 +01:00
|
|
|
pytest "$@"
|
2024-02-24 12:28:55 +01:00
|
|
|
fi
|