Skip to content

Commit

Permalink
test: test-npm.sh defaults to out/Release/node
Browse files Browse the repository at this point in the history
Like tools/test.py, tools/test-npm.sh now defaults to the node in
out/Release, this can still be changed by setting the $NODE environment
variable.
  • Loading branch information
gibfahn committed Dec 28, 2016
1 parent 4da4457 commit 6c0e382
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/test-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ cd $(dirname $0)/..
# pass a $NODE environment variable from something like Makefile
# it should point to either ./node or ./node.exe, depending on the platform
if [ -z $NODE ]; then
echo "No node executable provided. Bailing." >&2
exit 0
echo "No \$NODE executable provided, defaulting to out/Release/node." >&2
NODE=out/Release/node
fi

# ensure npm always uses the local node
export PATH="$PWD/`dirname $NODE`:$PATH"
unset NODE

rm -rf test-npm

# make a copy of deps/npm to run the tests on
Expand All @@ -43,10 +47,6 @@ export npm_config_prefix="$(pwd)/npm-prefix"
export npm_config_tmp="$(pwd)/npm-tmp"
export npm_config_userconfig="$(pwd)/npm-userconfig"

# ensure npm always uses the local node
export PATH="$(../$NODE -p 'require("path").resolve("..")'):$PATH"
unset NODE

# make sure the binaries from the non-dev-deps are available
node cli.js rebuild
# install npm devDependencies and run npm's tests
Expand Down

0 comments on commit 6c0e382

Please sign in to comment.