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

tools: remove NODE_PATH from environment for tests #11612

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Feb 28, 2017

Unset NODE_PATH environment variable when running tests.

On Ubuntu 16.04, some users experience test failures due to internal
libraries being installed in /usr/lib/nodejs/internal and NODE_PATH
including /usr/lib/nodejs. Tests that expect internal libraries to be
off limits without the --expose-internals flag will fail in this
situation. Currently, those tests are test/parallel/test-repl.js and
test/parallel/test-internal-modules.js.

This situation seems to (probably) be caused by some
not-entirely-uncommon package that gets installed.

Regardless, tests should ignore the user's NODE_PATH. (NODE_PATH is
tested in test/parallel/test-module-globalpaths-nodepath.js and
test/parallel/test-require-dot.js.)

Refs: https://twitter.com/trott/status/835729396900061184

/cc @bengl @nodejs/testing @nodejs/build

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools test

Unset NODE_PATH environment variable when running tests.

On Ubuntu 16.04, some users experience test failures due to internal
libraries being installed in /usr/lib/nodejs/internal and NODE_PATH
including /usr/lib/nodejs. Tests that expect internal libraries to be
off limits without the --expose-internals flag will fail in this
situation. Currently, those tests are test/parallel/test-repl.js and
test/parallel/test-internal-modules.js.

This situation seems to (probably) be caused by some
not-entirely-uncommon package that gets installed.

Regardless, tests should ignore the user's NODE_PATH. (NODE_PATH is
tested in test/parallel/test-module-globalpaths-nodepath.js and
test/parallel/test-require-dot.js.)

Refs: https://twitter.com/trott/status/835729396900061184
@Trott Trott added test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. labels Feb 28, 2017
@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Feb 28, 2017
@Trott
Copy link
Member Author

Trott commented Feb 28, 2017

@Trott
Copy link
Member Author

Trott commented Feb 28, 2017

Trott added a commit to Trott/io.js that referenced this pull request Mar 2, 2017
Unset NODE_PATH environment variable when running tests.

On Ubuntu 16.04, some users experience test failures due to internal
libraries being installed in /usr/lib/nodejs/internal and NODE_PATH
including /usr/lib/nodejs. Tests that expect internal libraries to be
off limits without the --expose-internals flag will fail in this
situation. Currently, those tests are test/parallel/test-repl.js and
test/parallel/test-internal-modules.js.

This situation seems to (probably) be caused by some
not-entirely-uncommon package that gets installed.

Regardless, tests should ignore the user's NODE_PATH. (NODE_PATH is
tested in test/parallel/test-module-globalpaths-nodepath.js and
test/parallel/test-require-dot.js.)

PR-URL: nodejs#11612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Refs: https://twitter.com/trott/status/835729396900061184
@Trott
Copy link
Member Author

Trott commented Mar 2, 2017

Landed in 22d7dc2

@Trott Trott closed this Mar 2, 2017
addaleax pushed a commit that referenced this pull request Mar 5, 2017
Unset NODE_PATH environment variable when running tests.

On Ubuntu 16.04, some users experience test failures due to internal
libraries being installed in /usr/lib/nodejs/internal and NODE_PATH
including /usr/lib/nodejs. Tests that expect internal libraries to be
off limits without the --expose-internals flag will fail in this
situation. Currently, those tests are test/parallel/test-repl.js and
test/parallel/test-internal-modules.js.

This situation seems to (probably) be caused by some
not-entirely-uncommon package that gets installed.

Regardless, tests should ignore the user's NODE_PATH. (NODE_PATH is
tested in test/parallel/test-module-globalpaths-nodepath.js and
test/parallel/test-require-dot.js.)

PR-URL: #11612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Refs: https://twitter.com/trott/status/835729396900061184
@evanlucas evanlucas mentioned this pull request Mar 8, 2017
MylesBorins pushed a commit that referenced this pull request Apr 17, 2017
Unset NODE_PATH environment variable when running tests.

On Ubuntu 16.04, some users experience test failures due to internal
libraries being installed in /usr/lib/nodejs/internal and NODE_PATH
including /usr/lib/nodejs. Tests that expect internal libraries to be
off limits without the --expose-internals flag will fail in this
situation. Currently, those tests are test/parallel/test-repl.js and
test/parallel/test-internal-modules.js.

This situation seems to (probably) be caused by some
not-entirely-uncommon package that gets installed.

Regardless, tests should ignore the user's NODE_PATH. (NODE_PATH is
tested in test/parallel/test-module-globalpaths-nodepath.js and
test/parallel/test-require-dot.js.)

PR-URL: #11612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Refs: https://twitter.com/trott/status/835729396900061184
MylesBorins pushed a commit that referenced this pull request Apr 19, 2017
Unset NODE_PATH environment variable when running tests.

On Ubuntu 16.04, some users experience test failures due to internal
libraries being installed in /usr/lib/nodejs/internal and NODE_PATH
including /usr/lib/nodejs. Tests that expect internal libraries to be
off limits without the --expose-internals flag will fail in this
situation. Currently, those tests are test/parallel/test-repl.js and
test/parallel/test-internal-modules.js.

This situation seems to (probably) be caused by some
not-entirely-uncommon package that gets installed.

Regardless, tests should ignore the user's NODE_PATH. (NODE_PATH is
tested in test/parallel/test-module-globalpaths-nodepath.js and
test/parallel/test-require-dot.js.)

PR-URL: #11612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Refs: https://twitter.com/trott/status/835729396900061184
@MylesBorins MylesBorins mentioned this pull request Apr 19, 2017
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
Unset NODE_PATH environment variable when running tests.

On Ubuntu 16.04, some users experience test failures due to internal
libraries being installed in /usr/lib/nodejs/internal and NODE_PATH
including /usr/lib/nodejs. Tests that expect internal libraries to be
off limits without the --expose-internals flag will fail in this
situation. Currently, those tests are test/parallel/test-repl.js and
test/parallel/test-internal-modules.js.

This situation seems to (probably) be caused by some
not-entirely-uncommon package that gets installed.

Regardless, tests should ignore the user's NODE_PATH. (NODE_PATH is
tested in test/parallel/test-module-globalpaths-nodepath.js and
test/parallel/test-require-dot.js.)

PR-URL: nodejs/node#11612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Refs: https://twitter.com/trott/status/835729396900061184
@Trott Trott deleted the ubuntu-node-path branch January 13, 2022 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants