Skip to content

Commit cafbe32

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver into PYTHON-4330
2 parents f6cc79b + 215bca2 commit cafbe32

File tree

143 files changed

+12607
-3340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+12607
-3340
lines changed

.evergreen/config.yml

Lines changed: 54 additions & 1315 deletions
Large diffs are not rendered by default.

.evergreen/generated_configs/tasks.yml

Lines changed: 2882 additions & 0 deletions
Large diffs are not rendered by default.

.evergreen/generated_configs/variants.yml

Lines changed: 1428 additions & 0 deletions
Large diffs are not rendered by default.

.evergreen/hatch.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,25 @@ if [ -n "$SKIP_HATCH" ]; then
1818
run_hatch() {
1919
bash ./.evergreen/run-tests.sh
2020
}
21-
elif $PYTHON_BINARY -m hatch --version; then
22-
run_hatch() {
23-
$PYTHON_BINARY -m hatch run "$@"
24-
}
25-
else # No toolchain hatch present, set up virtualenv before installing hatch
21+
else # Set up virtualenv before installing hatch
2622
# Use a random venv name because the encryption tasks run this script multiple times in the same run.
2723
ENV_NAME=hatchenv-$RANDOM
2824
createvirtualenv "$PYTHON_BINARY" $ENV_NAME
2925
# shellcheck disable=SC2064
3026
trap "deactivate; rm -rf $ENV_NAME" EXIT HUP
3127
python -m pip install -q hatch
28+
29+
# Ensure hatch does not write to user or global locations.
30+
touch hatch_config.toml
31+
HATCH_CONFIG=$(pwd)/hatch_config.toml
32+
if [ "Windows_NT" = "$OS" ]; then # Magic variable in cygwin
33+
HATCH_CONFIG=$(cygpath -m "$HATCH_CONFIG")
34+
fi
35+
export HATCH_CONFIG
36+
hatch config restore
37+
hatch config set dirs.data "$(pwd)/.hatch/data"
38+
hatch config set dirs.cache "$(pwd)/.hatch/cache"
39+
3240
run_hatch() {
3341
python -m hatch run "$@"
3442
}

.evergreen/run-tests.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ set -o xtrace
3030

3131
AUTH=${AUTH:-noauth}
3232
SSL=${SSL:-nossl}
33-
TEST_SUITES=""
33+
TEST_SUITES=${TEST_SUITES:-}
3434
TEST_ARGS="${*:1}"
3535

3636
export PIP_QUIET=1 # Quiet by default
@@ -90,6 +90,8 @@ if [ -n "$TEST_ENTERPRISE_AUTH" ]; then
9090
export GSSAPI_HOST=${SASL_HOST}
9191
export GSSAPI_PORT=${SASL_PORT}
9292
export GSSAPI_PRINCIPAL=${PRINCIPAL}
93+
94+
export TEST_SUITES="auth"
9395
fi
9496

9597
if [ -n "$TEST_LOADBALANCER" ]; then
@@ -257,9 +259,9 @@ if [ -z "$GREEN_FRAMEWORK" ]; then
257259
# Use --capture=tee-sys so pytest prints test output inline:
258260
# https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html
259261
if [ -z "$TEST_SUITES" ]; then
260-
python -m pytest -v --capture=tee-sys --durations=5 --maxfail=10 $TEST_ARGS
262+
python -m pytest -v --capture=tee-sys --durations=5 $TEST_ARGS
261263
else
262-
python -m pytest -v --capture=tee-sys --durations=5 --maxfail=10 -m $TEST_SUITES $TEST_ARGS
264+
python -m pytest -v --capture=tee-sys --durations=5 -m $TEST_SUITES $TEST_ARGS
263265
fi
264266
else
265267
python green_framework_test.py $GREEN_FRAMEWORK -v $TEST_ARGS

0 commit comments

Comments
 (0)