@@ -38,6 +38,7 @@ export PIP_PREFER_BINARY=1 # Prefer binary dists by default
3838
3939set +x
4040python -c " import sys; sys.exit(sys.prefix == sys.base_prefix)" || (echo " Not inside a virtual env!" ; exit 1)
41+ PYTHON_IMPL=$( python -c " import platform; print(platform.python_implementation())" )
4142
4243# Try to source local Drivers Secrets
4344if [ -f ./secrets-export.sh ]; then
4748 echo " Not sourcing secrets"
4849fi
4950
51+ # Ensure C extensions have compiled.
52+ if [ -z " ${NO_EXT:- } " ] && [ " $PYTHON_IMPL " = " CPython" ]; then
53+ python tools/fail_if_no_c.py
54+ fi
55+
5056if [ " $AUTH " != " noauth" ]; then
51- if [ ! -z " $TEST_DATA_LAKE " ]; then
57+ if [ -n " $TEST_DATA_LAKE " ]; then
5258 export DB_USER=" mhuser"
5359 export DB_PASSWORD=" pencil"
54- elif [ ! -z " $TEST_SERVERLESS " ]; then
55- source ${DRIVERS_TOOLS} /.evergreen/serverless/secrets-export.sh
60+ elif [ -n " $TEST_SERVERLESS " ]; then
61+ source " ${DRIVERS_TOOLS} " /.evergreen/serverless/secrets-export.sh
5662 export DB_USER=$SERVERLESS_ATLAS_USER
5763 export DB_PASSWORD=$SERVERLESS_ATLAS_PASSWORD
5864 export MONGODB_URI=" $SERVERLESS_URI "
5965 echo " MONGODB_URI=$MONGODB_URI "
6066 export SINGLE_MONGOS_LB_URI=$MONGODB_URI
6167 export MULTI_MONGOS_LB_URI=$MONGODB_URI
62- elif [ ! -z " $TEST_AUTH_OIDC " ]; then
68+ elif [ -n " $TEST_AUTH_OIDC " ]; then
6369 export DB_USER=$OIDC_ADMIN_USER
6470 export DB_PASSWORD=$OIDC_ADMIN_PWD
6571 export DB_IP=" $MONGODB_URI "
@@ -240,7 +246,6 @@ python -c 'import sys; print(sys.version)'
240246
241247# Run the tests with coverage if requested and coverage is installed.
242248# Only cover CPython. PyPy reports suspiciously low coverage.
243- PYTHON_IMPL=$( python -c " import platform; print(platform.python_implementation())" )
244249if [ -n " $COVERAGE " ] && [ " $PYTHON_IMPL " = " CPython" ]; then
245250 # Keep in sync with combine-coverage.sh.
246251 # coverage >=5 is needed for relative_files=true.
0 commit comments