Skip to content

Conversation

@BethGriggs
Copy link
Member

Allows env vars to be passed through to child processes. This is needed for
things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library.

Refs: #13390

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

test

/cc @Trott

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Aug 14, 2017
@tniessen
Copy link
Member

cc @nodejs/testing

Copy link
Member

@gibfahngibfahnAug 14, 2017

Choose a reason for hiding this comment

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

Maybe do this to be more explicit:

functiontest(newEnv){constenv=Object.assign({},process.env,newEnv);

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I'd rewrap this as:

constchild=fork(runjs,['--set','dur=0','--set','n=1','--set','len=1','--set','params=1','--set','methodName=execSync','child_process'],{ env });

Copy link
Member

Choose a reason for hiding this comment

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

Not really related to this PR, but if @BethGriggs wants to do that that's fine too.

@refack
Copy link
Contributor

7 uses in 7 files in my book calls for a common utility or even a new endpoint in child_process. But that is completely up to you @BethGriggs

@refack
Copy link
Contributor

Ref: #14823

@gibfahn
Copy link
Member

7 uses in 7 files in my book calls for a common utility or even a new endpoint in child_process. But that is completely up to you @BethGriggs

Agreed, but that's definitely not something for this PR (we'd have to decide which one first, and it'd be good to land this to fix these test failures ASAP, they don't fail in CI, but do on machines with long $WORKSPACE paths).

Allows env vars to be passed through to child processes. This is needed for things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library. Refs: nodejs#13390
Copy link
Member

@mhdawsonmhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@refackrefack left a comment

Choose a reason for hiding this comment

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

💯

@refackrefack added the confirmed-bug Issues with confirmed bugs. label Aug 14, 2017
@refack
Copy link
Contributor

@gibfahn I've added the confirmed-bug label. We can agree that PRs labeled as such should avoid "scope-creep".

Copy link
Member

@addaleaxaddaleax left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

I don’t think “confirmed-bug” makes any sense here.

If you don’t want scope creep, not requesting changes that would extend scope sounds sufficient to me?

@gibfahn
Copy link
Member

I don’t think “confirmed-bug” makes any sense here.

I'd say this is a bug in the tests, not in the source, so assuming that confirmed-bug is for the latter then I agree it doesn't apply.

@refack
Copy link
Contributor

I don’t think “confirmed-bug” makes any sense here.

If you don’t want scope creep, not requesting changes that would extend scope sounds sufficient to me?

I made scope-creep suggestions since I was not aware that this is a directed bug-fix. Thus I'm looking for a simple way to flag PRs as such, so future reviewers will be aware.
Since confirmed-bug doesn't have meaning for PRs (yet) it seemed like the easiest choice. Other options could be a new label.

@gibfahn
Copy link
Member

tniessen pushed a commit that referenced this pull request Aug 16, 2017
Allows env vars to be passed through to child processes. This is needed for things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library. PR-URL: #14822 Refs: #13390 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
@tniessen
Copy link
Member

Landed in c879c9a, thank you!

MSLaguana pushed a commit to nodejs/node-chakracore that referenced this pull request Aug 21, 2017
Allows env vars to be passed through to child processes. This is needed for things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library. PR-URL: nodejs/node#14822 Refs: nodejs/node#13390 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
BridgeAR pushed a commit that referenced this pull request Sep 3, 2017
PR-URL: #14845Fixes: #14823 Refs: #14822 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 5, 2017
PR-URL: nodejs/node#14845Fixes: nodejs/node#14823 Refs: nodejs/node#14822 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
Allows env vars to be passed through to child processes. This is needed for things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library. PR-URL: #14822 Refs: #13390 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
PR-URL: #14845Fixes: #14823 Refs: #14822 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Sep 10, 2017
MylesBorins pushed a commit that referenced this pull request Sep 11, 2017
Allows env vars to be passed through to child processes. This is needed for things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library. PR-URL: #14822 Refs: #13390 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 11, 2017
PR-URL: #14845Fixes: #14823 Refs: #14822 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
Allows env vars to be passed through to child processes. This is needed for things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library. PR-URL: #14822 Refs: #13390 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
PR-URL: #14845Fixes: #14823 Refs: #14822 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
gibfahn added a commit to gibfahn/node that referenced this pull request Sep 22, 2017
PR-URL: nodejs#14845 Backport-PR-URL: nodejs#15557Fixes: nodejs#14823 Refs: nodejs#14822 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 22, 2017
PR-URL: #14845 Backport-PR-URL: #15557Fixes: #14823 Refs: #14822 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 26, 2017
PR-URL: #14845 Backport-PR-URL: #15557Fixes: #14823 Refs: #14822 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
@gibfahn
Copy link
Member

@BethGriggs would you mind backporting this to 6.x? Guide is here.

BethGriggs added a commit to BethGriggs/node that referenced this pull request Feb 21, 2018
Allows env vars to be passed through to child processes. This is needed for things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library. PR-URL: nodejs#14822 Refs: nodejs#13390 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
@BethGriggsBethGriggs deleted the preserve-env-vars branch February 21, 2018 15:36
MylesBorins pushed a commit that referenced this pull request Feb 27, 2018
Allows env vars to be passed through to child processes. This is needed for things like NODE_TEST_DIR or LD_LIBRARY_PATH if testing the shared library. Backport-PR-URL: #18883 PR-URL: #14822 Refs: #13390 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
This was referenced Feb 27, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

confirmed-bugIssues with confirmed bugs.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11 participants

@BethGriggs@tniessen@refack@gibfahn@jasnell@addaleax@lpinca@cjihrig@mhdawson@MylesBorins@nodejs-github-bot