diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 7216fcb9a0d..d4e6a2ad46c 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1520,6 +1520,11 @@ tasks: - auth - kerberos commands: + - command: expansions.update + type: setup + params: + updates: + - {key: NATIVE, value: 'true'} - func: install dependencies - func: run kerberos tests - name: test-auth-ldap diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 2af924466f3..1f14f4c62ea 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -162,7 +162,13 @@ TASKS.push( { name: 'test-auth-kerberos', tags: ['auth', 'kerberos'], - commands: [{ func: 'install dependencies' }, { func: 'run kerberos tests' }] + commands: [ + updateExpansions({ + NATIVE: 'true' + }), + { func: 'install dependencies' }, + { func: 'run kerberos tests' } + ] }, { name: 'test-auth-ldap', diff --git a/.evergreen/install-dependencies.sh b/.evergreen/install-dependencies.sh index 33b9958b885..6715b1397df 100644 --- a/.evergreen/install-dependencies.sh +++ b/.evergreen/install-dependencies.sh @@ -11,6 +11,13 @@ export NODE_LTS_VERSION=${NODE_LTS_VERSION:-16} # be handled by this script in drivers tools. source $DRIVERS_TOOLS/.evergreen/install-node.sh +if [ "$NATIVE" = "true" ]; then + # https://github.com/nodejs/node-gyp#configuring-python-dependency + . $DRIVERS_TOOLS/.evergreen/find-python3.sh + NODE_GYP_FORCE_PYTHON=$(find_python3) + export NODE_GYP_FORCE_PYTHON +fi + npm install "${NPM_OPTIONS}" source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh