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

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

Conversation

misterdjules
Copy link

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
Author

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

@cjihrig
Copy link

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
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
Author

Landed in 03b4f44.

@misterdjules
Copy link
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