1#!/usr/bin/env bash
 2
 3# make sure we are in the right directory
 4SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
 5cd $SCRIPT_DIR
 6
 7set -eu
 8
 9if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
10    # Slow tests for tool calls need quite a few models ahead of time to avoid timing out.
11    python $SCRIPT_DIR/../../../scripts/fetch_server_test_models.py
12fi
13
14if [ $# -lt 1 ]
15then
16    if [[ "${SLOW_TESTS:-0}" == 1 ]]; then
17        pytest -v -x
18    else
19        pytest -v -x -m "not slow"
20    fi
21else
22    pytest "$@"
23fi