1
0

tests.sh 530 B

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