Skip to content

Commit 68b06e9

Browse files
committed
tools: use local or specified $NODE for test-npm
PR-URL: #1984 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent afd7e37 commit 68b06e9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ test-debugger: all
139139
$(PYTHON) tools/test.py debugger
140140

141141
test-npm: $(NODE_EXE)
142-
NODE_EXE=$(NODE_EXE) tools/test-npm.sh
142+
NODE=$(NODE) tools/test-npm.sh
143143

144144
test-npm-publish: $(NODE_EXE)
145145
npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js

tools/test-npm.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ set -e
55
# always change the working directory to the project's root directory
66
cd $(dirname $0)/..
77

8-
# pass NODE_EXE from something like Makefile
9-
# it should point to either {./}node or {./}node.exe, depending on the platform
10-
if [ -z $NODE_EXE ]; then
8+
# pass a $NODE environment variable from something like Makefile
9+
# it should point to either ./iojs or ./iojs.exe, depending on the platform
10+
if [ -z $NODE ]; then
1111
echo "No node executable provided. Bailing." >&2
1212
exit 0
1313
fi
@@ -29,9 +29,10 @@ export npm_config_prefix="npm-prefix"
2929
export npm_config_tmp="npm-tmp"
3030

3131
# install npm devDependencies and run npm's tests
32-
../$NODE_EXE cli.js install --ignore-scripts
33-
../$NODE_EXE cli.js run-script test-legacy
34-
../$NODE_EXE cli.js run-script test
32+
33+
../$NODE cli.js install --ignore-scripts
34+
../$NODE cli.js run-script test-legacy
35+
../$NODE cli.js run-script test
3536

3637
# clean up everything one single shot
3738
cd .. && rm -rf test-npm

0 commit comments

Comments
 (0)