forked from mongodb/mongo-python-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-tests.sh
More file actions
executable file
·43 lines (34 loc) · 955 Bytes
/
run-tests.sh
File metadata and controls
executable file
·43 lines (34 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -eu
SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0})
SCRIPT_DIR="$( cd -- "$SCRIPT_DIR" > /dev/null 2>&1 && pwd )"
ROOT_DIR="$(dirname $SCRIPT_DIR)"
pushd $ROOT_DIR
# Try to source the env file.
if [ -f $SCRIPT_DIR/scripts/env.sh ]; then
echo "Sourcing env inputs"
. $SCRIPT_DIR/scripts/env.sh
else
echo "Not sourcing env inputs"
fi
# Handle test inputs.
if [ -f $SCRIPT_DIR/scripts/test-env.sh ]; then
echo "Sourcing test inputs"
. $SCRIPT_DIR/scripts/test-env.sh
else
echo "Missing test inputs, please run 'just setup-tests'"
exit 1
fi
# Source the local secrets export file if available.
if [ -f "./secrets-export.sh" ]; then
echo "Sourcing local secrets file"
. "./secrets-export.sh"
fi
# List the packages.
uv sync ${UV_ARGS} --reinstall
uv pip list
# Ensure we go back to base environment after the test.
trap "uv sync" EXIT HUP
# Start the test runner.
uv run ${UV_ARGS} .evergreen/scripts/run_tests.py "$@"
popd