Skip to content

test(NODE-4357): delete windows tests #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ functions:
CURRENT_VERSION=latest
fi
export PROJECT_DIRECTORY="$(pwd)"
if [ "Windows_NT" = "$OS" ]; then
export PROJECT_DIRECTORY=$(cygpath -m $PROJECT_DIRECTORY)
fi

# get the latest version of node for given major version
NODE_VERSION=$(curl -sL nodejs.org/download/release/latest-v${NODE_MAJOR_VERSION}.x/SHASUMS256.txt -o - | head -n 1 | tr -s ' ' | cut -d' ' -f2 | cut -d- -f2 | cut -dv -f2)
Expand Down Expand Up @@ -214,10 +211,6 @@ buildvariants:
display_name: MacOS 10.14
run_on: macos-1014
tasks: [".node"]
- name: windows
display_name: Windows 64
run_on: windows-64-vsMulti-small
tasks: [".node"]
- name: lint
display_name: lint
run_on: rhel70
Expand Down
14 changes: 1 addition & 13 deletions .evergreen/init-nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ export PATH="/opt/mongodbtoolchain/v2/bin:$PATH"
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts"
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"

if [[ "$OS" == "Windows_NT" ]]; then
NVM_HOME=$(cygpath -w "$NVM_DIR")
export NVM_HOME
NVM_SYMLINK=$(cygpath -w "$NODE_ARTIFACTS_PATH/bin")
export NVM_SYMLINK
NVM_ARTIFACTS_PATH=$(cygpath -w "$NODE_ARTIFACTS_PATH/bin")
export NVM_ARTIFACTS_PATH
PATH=$(cygpath $NVM_SYMLINK):$(cygpath $NVM_HOME):$PATH
export PATH
echo "updated path on windows PATH=$PATH"
else
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
fi
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"

export NODE_OPTIONS="--trace-deprecation --trace-warnings"
53 changes: 11 additions & 42 deletions .evergreen/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts"
NPM_CACHE_DIR="${NODE_ARTIFACTS_PATH}/npm"
NPM_TMP_DIR="${NODE_ARTIFACTS_PATH}/tmp"
BIN_DIR="$(pwd)/bin"
NVM_WINDOWS_URL="https://github.com/coreybutler/nvm-windows/releases/download/1.1.9/nvm-noinstall.zip"
NVM_URL="https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh"

# this needs to be explicitly exported for the nvm install below
Expand All @@ -28,51 +27,21 @@ export PATH="${BIN_DIR}:${PATH}"

# install Node.js
echo "Installing Node ${NODE_LTS_NAME}"
if [ "$OS" == "Windows_NT" ]; then
set +o xtrace

export NVM_HOME=`cygpath -w "$NVM_DIR"`
export NVM_SYMLINK=`cygpath -w "$NODE_ARTIFACTS_PATH/bin"`
export PATH=`cygpath $NVM_SYMLINK`:`cygpath $NVM_HOME`:$PATH
set +o xtrace

# download and install nvm
curl -L $NVM_WINDOWS_URL -o nvm.zip
unzip -d $NVM_DIR nvm.zip
rm nvm.zip
echo " Downloading nvm"
curl -o- $NVM_URL | bash
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"

chmod 777 $NVM_DIR
chmod -R a+rx $NVM_DIR
echo "Running: nvm install --lts --latest-npm"
nvm install --lts --latest-npm
echo "Running: nvm install ${NODE_VERSION}"
nvm install "${NODE_VERSION}"
echo "Running: nvm use --lts"
nvm use --lts

cat <<EOT > $NVM_DIR/settings.txt
root: $NVM_HOME
path: $NVM_SYMLINK
EOT

echo "Running: nvm install lts"
nvm install lts
echo "Running: nvm install ${NODE_VERSION}"
nvm install "${NODE_VERSION}"
echo "Running: nvm use lts"
nvm use lts
echo "Running: npm install -g [email protected]"
npm install -g [email protected] # https://github.com/npm/cli/issues/4341
set -o xtrace
else
set +o xtrace

echo " Downloading nvm"
curl -o- $NVM_URL | bash
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"

echo "Running: nvm install --lts --latest-npm"
nvm install --lts --latest-npm
echo "Running: nvm install ${NODE_VERSION}"
nvm install "${NODE_VERSION}"
echo "Running: nvm use --lts"
nvm use --lts

set -o xtrace
fi
set -o xtrace



Expand Down
13 changes: 4 additions & 9 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@ fi

NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts"

if [ "$OS" == "Windows_NT" ]; then
export NVM_HOME=`cygpath -w "$NODE_ARTIFACTS_PATH/nvm"`
export NVM_SYMLINK=`cygpath -w "$NODE_ARTIFACTS_PATH/bin"`
export PATH=`cygpath $NVM_SYMLINK`:`cygpath $NVM_HOME`:$PATH
else
export PATH="/opt/mongodbtoolchain/v2/bin:$PATH"
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
fi
export PATH="/opt/mongodbtoolchain/v2/bin:$PATH"
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"


case $1 in
"node")
Expand Down
2 changes: 1 addition & 1 deletion test/bson_older_versions_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe('Mutual version and distribution compatibility', function () {
fromObjects = makeObjects(fromBSON);
},
err => {
if (+process.version.slice(1).split('.')[0] >= 12 && process.platform !== 'win32') {
if (+process.version.slice(1).split('.')[0] >= 12) {
throw err; // On Node.js 12+, all loading is expected to work.
} else {
this.skip(); // Otherwise, e.g. ESM can't be loaded, so just skip.
Expand Down