Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

test: make test-npm uses custom node, not global#9107

Closed
misterdjules wants to merge 1 commit intonodejs:v0.12from
misterdjules:make-test-npm-use-custom-built-node
Closed

test: make test-npm uses custom node, not global#9107
misterdjules wants to merge 1 commit intonodejs:v0.12from
misterdjules:make-test-npm-use-custom-built-node

Conversation

@misterdjules
Copy link
Copy Markdown

When running make test-npm, make would use the node binary available in
the PATH, which would most of the time not be the same binary as the one
built from the source tree from where the make test-npm command in run.

This can be confusing, as it can lead users to think that they tested
npm with the version of node that was built from the current checkout of
the source tree when it would actually run the tests with a completely
different version.

This change modifies the PATH environment variable for all commands that
need to run the node binary to run npm's tests by adding the root of the
local checkout as the first entry, so that the custom built node is
always used.

When running make test-npm, make would use the node binary available in
the PATH, which would most of the time not be the same binary as the one
built from the source tree from where the make test-npm command in run.

This can be confusing, as it can lead users to think that they tested
npm with the version of node that was built from the current checkout of
the source tree when it would actually run the tests with a completely
different version.

This change modifies the PATH environment variable for all commands that
need to run the node binary to run npm's tests by adding the root of the
local checkout as the first entry, so that the custom built node is
always used.
@misterdjules
Copy link
Copy Markdown
Author

This happened recently when testing an upgrade to a newer version of npm.

@cjihrig
Copy link
Copy Markdown

cjihrig commented Jan 29, 2015

LGTM if it works

@misterdjules misterdjules added this to the 0.12.3 milestone Apr 30, 2015
@misterdjules
Copy link
Copy Markdown
Author

/cc @joyent/node-coreteam

misterdjules pushed a commit that referenced this pull request May 1, 2015
When running make test-npm, make would use the node binary available in
the PATH, which would most of the time not be the same binary as the one
built from the source tree from where the make test-npm command in run.

This can be confusing, as it can lead users to think that they tested
npm with the version of node that was built from the current checkout of
the source tree when it would actually run the tests with a completely
different version.

This change modifies the PATH environment variable for all commands that
need to run the node binary to run npm's tests by adding the root of the
local checkout as the first entry, so that the custom built node is
always used.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #9107
@misterdjules
Copy link
Copy Markdown
Author

Landed in 03b4f44.

@misterdjules
Copy link
Copy Markdown
Author

Thank you @cjihrig!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants