Skip to content
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

test: update test-npm to work with npm 3 #3308

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 4 additions & 4 deletions tools/test-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ export npm_config_prefix="npm-prefix"
export npm_config_tmp="npm-tmp"

# install npm devDependencies and run npm's tests

../$NODE cli.js install --ignore-scripts
../$NODE cli.js run-script test-legacy
../$NODE cli.js run-script test
NODEPATH="$(../$NODE -p 'require("path").resolve("..")')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rvagg can I get a quick LGTM on changing this line to export PATH="$(../$NODE -p 'require("path").resolve("..")'):$PATH"?

That will mean we no longer require the PATH="$NODEPATH:$PATH" on the 3 lines below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @nodejs/build

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that'll do, can be improved later perhaps

PATH="$NODEPATH:$PATH" ../$NODE cli.js install --ignore-scripts
PATH="$NODEPATH:$PATH" ../$NODE test/run.js
PATH="$NODEPATH:$PATH" ../$NODE cli.js run-script tap -- "test/tap/*.js"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok one thing here: could you do export PATH="$NODEPATH:$PATH" above these three lines? To my understanding it should give the same effect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, it'll only matter if there's other work in this script that cares about PATH, which there isn't


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