@@ -30,6 +30,7 @@ set -o xtrace
3030
3131AUTH=${AUTH:- noauth}
3232SSL=${SSL:- nossl}
33+ TEST_SUITES=" test/ test/asynchronous/"
3334TEST_ARGS=" ${*: 1} "
3435
3536export PIP_QUIET=1 # Quiet by default
@@ -95,7 +96,7 @@ if [ -n "$TEST_LOADBALANCER" ]; then
9596 export LOAD_BALANCER=1
9697 export SINGLE_MONGOS_LB_URI=" ${SINGLE_MONGOS_LB_URI:- mongodb:// 127.0.0.1: 8000/ ?loadBalanced=true} "
9798 export MULTI_MONGOS_LB_URI=" ${MULTI_MONGOS_LB_URI:- mongodb:// 127.0.0.1: 8001/ ?loadBalanced=true} "
98- export TEST_ARGS =" test/test_load_balancer.py"
99+ export TEST_SUITES =" test/test_load_balancer.py"
99100fi
100101
101102if [ " $SSL " != " nossl" ]; then
@@ -123,9 +124,9 @@ if [ -n "$TEST_ENCRYPTION" ] || [ -n "$TEST_FLE_AZURE_AUTO" ] || [ -n "$TEST_FLE
123124
124125 python -m pip install ' .[encryption]'
125126
126- # Install libmongocrypt if necessary.
127+ # Setup encryption if necessary.
127128 if [ ! -d " libmongocrypt" ]; then
128- bash ./.evergreen/setup-libmongocrypt .sh
129+ bash ./.evergreen/setup-encryption .sh
129130 fi
130131
131132 # Use the nocrypto build to avoid dependency issues with older windows/python versions.
@@ -171,9 +172,7 @@ if [ -n "$TEST_ENCRYPTION" ]; then
171172 export PATH=$CRYPT_SHARED_DIR :$PATH
172173 fi
173174 # Only run the encryption tests.
174- if [ -z " $TEST_ARGS " ]; then
175- TEST_ARGS=" test/test_encryption.py"
176- fi
175+ TEST_SUITES=" test/test_encryption.py"
177176fi
178177
179178if [ -n " $TEST_FLE_AZURE_AUTO " ] || [ -n " $TEST_FLE_GCP_AUTO " ]; then
@@ -187,9 +186,7 @@ if [ -n "$TEST_FLE_AZURE_AUTO" ] || [ -n "$TEST_FLE_GCP_AUTO" ]; then
187186 exit 1
188187 fi
189188
190- if [ -z " $TEST_ARGS " ]; then
191- TEST_ARGS=" test/test_on_demand_csfle.py"
192- fi
189+ TEST_SUITES=" test/test_on_demand_csfle.py"
193190fi
194191
195192if [ -n " $TEST_INDEX_MANAGEMENT " ]; then
@@ -198,36 +195,36 @@ if [ -n "$TEST_INDEX_MANAGEMENT" ]; then
198195 set +x
199196 export DB_PASSWORD=" ${DRIVERS_ATLAS_LAMBDA_PASSWORD} "
200197 set -x
201- TEST_ARGS =" test/test_index_management.py"
198+ TEST_SUITES =" test/test_index_management.py"
202199fi
203200
204201if [ -n " $TEST_DATA_LAKE " ] && [ -z " $TEST_ARGS " ]; then
205- TEST_ARGS =" test/test_data_lake.py"
202+ TEST_SUITES =" test/test_data_lake.py"
206203fi
207204
208205if [ -n " $TEST_ATLAS " ]; then
209- TEST_ARGS =" test/atlas/test_connection.py"
206+ TEST_SUITES =" test/atlas/test_connection.py"
210207fi
211208
212209if [ -n " $TEST_OCSP " ]; then
213210 python -m pip install " .[ocsp]"
214- TEST_ARGS =" test/ocsp/test_ocsp.py"
211+ TEST_SUITES =" test/ocsp/test_ocsp.py"
215212fi
216213
217214if [ -n " $TEST_AUTH_AWS " ]; then
218215 python -m pip install " .[aws]"
219- TEST_ARGS =" test/auth_aws/test_auth_aws.py"
216+ TEST_SUITES =" test/auth_aws/test_auth_aws.py"
220217fi
221218
222219if [ -n " $TEST_AUTH_OIDC " ]; then
223220 python -m pip install " .[aws]"
224- TEST_ARGS =" test/auth_oidc/test_auth_oidc.py $TEST_ARGS "
221+ TEST_SUITES =" test/auth_oidc/test_auth_oidc.py $TEST_ARGS "
225222fi
226223
227224if [ -n " $PERF_TEST " ]; then
228225 python -m pip install simplejson
229226 start_time=$( date +%s)
230- TEST_ARGS =" test/performance/perf_test.py"
227+ TEST_SUITES =" test/performance/perf_test.py"
231228fi
232229
233230echo " Running $AUTH tests over $SSL with python $( which python) "
@@ -257,8 +254,7 @@ PIP_QUIET=0 python -m pip list
257254if [ -z " $GREEN_FRAMEWORK " ]; then
258255 # Use --capture=tee-sys so pytest prints test output inline:
259256 # https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html
260- python -m pytest -v --capture=tee-sys --durations=5 --maxfail=10 $TEST_ARGS
261- python -m pytest -v --capture=tee-sys --durations=5 --maxfail=10 test/asynchronous/ $TEST_ARGS
257+ python -m pytest -v --capture=tee-sys --durations=5 --maxfail=10 $TEST_SUITES $TEST_ARGS
262258else
263259 python green_framework_test.py $GREEN_FRAMEWORK -v $TEST_ARGS
264260fi
0 commit comments