tools: run tool call slow tests when SLOW_TESTS=1 (+ prefetch models)
This commit is contained in:
parent
259d9e4511
commit
acf7c240d8
1 changed files with 12 additions and 3 deletions
|
@ -1,14 +1,23 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# make sure we are in the right directory
|
# make sure we are in the right directory
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
TESTS_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
cd $SCRIPT_DIR
|
cd $TESTS_DIR
|
||||||
|
|
||||||
set -eu
|
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 $TESTS_DIR/../../../scripts/fetch_server_test_models.py
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $# -lt 1 ]
|
if [ $# -lt 1 ]
|
||||||
then
|
then
|
||||||
|
if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
|
||||||
|
pytest -v -x
|
||||||
|
else
|
||||||
pytest -v -x -m "not slow"
|
pytest -v -x -m "not slow"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
pytest "$@"
|
pytest "$@"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue