Skip to content

Commit abe5b76

Browse files
committed
run install-dependencies.sh from run-tests.sh for matrix tests
1 parent 3f2f987 commit abe5b76

File tree

5 files changed

+26
-40
lines changed

5 files changed

+26
-40
lines changed

.evergreen/config.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ functions:
113113
fi
114114
115115
AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} MONGODB_URI="${MONGODB_URI}" \
116-
NODE_VERSION=${NODE_VERSION} bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
116+
NODE_VERSION=${NODE_VERSION} SKIP_DEPS=1 bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
117117
run checks:
118118
- command: shell.exec
119119
type: test
@@ -1672,11 +1672,11 @@ buildvariants:
16721672
NODE_LTS_NAME: argon
16731673
CLIENT_ENCRYPTION: true
16741674
tasks: *ref_2
1675-
- name: windows-64-vs2013-erbium
1676-
display_name: Windows (VS2013) Node Erbium
1675+
- name: windows-64-vs2013-carbon
1676+
display_name: Windows (VS2013) Node Carbon
16771677
run_on: windows-64-vs2013-large
16781678
expansions:
1679-
NODE_LTS_NAME: erbium
1679+
NODE_LTS_NAME: carbon
16801680
MSVS_VERSION: 2013
16811681
tasks: &ref_3
16821682
- test-4.2-server
@@ -1721,20 +1721,6 @@ buildvariants:
17211721
- test-2.6-server-unified
17221722
- test-2.6-replica_set-unified
17231723
- test-2.6-sharded_cluster-unified
1724-
- name: windows-64-vs2013-dubnium
1725-
display_name: Windows (VS2013) Node Dubnium
1726-
run_on: windows-64-vs2013-large
1727-
expansions:
1728-
NODE_LTS_NAME: dubnium
1729-
MSVS_VERSION: 2013
1730-
tasks: *ref_3
1731-
- name: windows-64-vs2013-carbon
1732-
display_name: Windows (VS2013) Node Carbon
1733-
run_on: windows-64-vs2013-large
1734-
expansions:
1735-
NODE_LTS_NAME: carbon
1736-
MSVS_VERSION: 2013
1737-
tasks: *ref_3
17381724
- name: windows-64-vs2013-boron
17391725
display_name: Windows (VS2013) Node Boron
17401726
run_on: windows-64-vs2013-large

.evergreen/config.yml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ functions:
132132
fi
133133

134134
AUTH=${AUTH} SSL=${SSL} UNIFIED=${UNIFIED} MONGODB_URI="${MONGODB_URI}" \
135-
NODE_VERSION=${NODE_VERSION} bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
135+
NODE_VERSION=${NODE_VERSION} SKIP_DEPS=1 bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
136136

137137
"run checks":
138138
- command: shell.exec

.evergreen/generate_evergreen_tasks.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ const OPERATING_SYSTEMS = [
4545
display_name: 'Windows (VS2013)',
4646
run_on: 'windows-64-vs2013-large',
4747
msvsVersion: 2013,
48-
mongoVersion: '<4.4'
48+
mongoVersion: '<4.4',
49+
nodeVersions: ['carbon', 'boron', 'argon']
4950
},
5051
{
5152
name: 'windows-64-vs2015',

.evergreen/install-dependencies.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ EOT
8686
else
8787
curl -o- $NVM_URL | bash
8888
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"
89-
nvm install --no-progress --lts=${NODE_LTS_NAME}
89+
nvm install --no-progress $NODE_VERSION
9090

9191
# setup npm cache in a local directory
9292
cat <<EOT > .npmrc
@@ -101,10 +101,4 @@ fi
101101
# NOTE: registry was overridden to not use artifactory, remove the `registry` line when
102102
# BUILD-6774 is resolved.
103103

104-
# install node dependencies
105-
if [[ "$SKIP_INSTALL" == "1" ]]; then
106-
echo "Skipping npm install"
107-
else
108-
echo "Running npm install"
109-
npm install --unsafe-perm
110-
fi
104+
npm install --unsafe-perm

.evergreen/run-tests.sh

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# set -o xtrace # Write all commands first to stderr
2+
set -o xtrace # Write all commands first to stderr
33
set -o errexit # Exit the script with error if any of the commands fail
44

55
# Supported/used environment variables:
@@ -8,11 +8,13 @@ set -o errexit # Exit the script with error if any of the commands fail
88
# UNIFIED Set to enable the Unified SDAM topology for the node driver
99
# MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info)
1010
# MARCH Machine Architecture. Defaults to lowercase uname -m
11+
# TEST_NPM_SCRIPT Script to npm run. Defaults to "test-nolint"
12+
# SKIP_DEPS Skip installing dependencies
1113

1214
AUTH=${AUTH:-noauth}
1315
UNIFIED=${UNIFIED:-}
1416
MONGODB_URI=${MONGODB_URI:-}
15-
TEST_NPM_SCRIPT="test-nolint"
17+
TEST_NPM_SCRIPT=${TEST_NPM_SCRIPT:-test-nolint}
1618

1719
# ssl setup
1820
SSL=${SSL:-nossl}
@@ -25,18 +27,21 @@ fi
2527
echo "Running $AUTH tests over $SSL, connecting to $MONGODB_URI"
2628

2729
export PATH="/opt/mongodbtoolchain/v2/bin:$PATH"
28-
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts"
29-
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"
30-
if [[ "$OS" == "Windows_NT" ]]; then
31-
export NVM_HOME=`cygpath -m -a "$NVM_DIR"`
32-
export NVM_SYMLINK=`cygpath -m -a "$NODE_ARTIFACTS_PATH/bin"`
33-
export NVM_ARTIFACTS_PATH=`cygpath -m -a "$NODE_ARTIFACTS_PATH/bin"`
34-
export PATH=`cygpath $NVM_SYMLINK`:`cygpath $NVM_HOME`:$PATH
35-
echo "updated path on windows PATH=$PATH"
30+
31+
if [[ -z "${SKIP_DEPS}" ]]; then
32+
source "${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh"
3633
else
37-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
34+
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts"
35+
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"
36+
if [[ "$OS" == "Windows_NT" ]]; then
37+
export NVM_HOME=`cygpath -m -a "$NVM_DIR"`
38+
export NVM_SYMLINK=`cygpath -m -a "$NODE_ARTIFACTS_PATH/bin"`
39+
export NVM_ARTIFACTS_PATH=`cygpath -m -a "$NODE_ARTIFACTS_PATH/bin"`
40+
export PATH=`cygpath $NVM_SYMLINK`:`cygpath $NVM_HOME`:$PATH
41+
else
42+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
43+
fi
3844
fi
39-
echo "initializing NVM, NVM_DIR=$NVM_DIR"
4045

4146
# only run FLE tets on hosts we explicitly choose to test on
4247
if [[ -z "${CLIENT_ENCRYPTION}" ]]; then

0 commit comments

Comments
 (0)