GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: allow passing args to executable by stefanmb · Pull Request #5376 · nodejs/node

Conversation

@stefanmb

@stefanmb stefanmb commented Feb 23, 2016

Copy link
Copy Markdown
Contributor

To set up CI jobs for #5181 there has to be a way to pass an argument to the Node executable at test time. The makefile supports the TEST_CI_ARGS environment variable, but the test harness (test.py) provides no facility to further pass the argument to the executable under test.

There is a "--special-command" argument, but it is only able to suffix or prefix the existing command line in the format [node, test] so it is insufficient to produce commands in the form [node, node_args, test]. In this PR I've introduced an extra argument to the test harness called --node-args which can be used to pass commands verbatim.

Some support for this feature already existed in test/init.py in the form of the "additional" argument, however none of the individual test modules' testcfg.py make use of it, so in the interest of minimal footprint I've opted to directly set this value form test.py, instead of passing it through as a constructor argument.

There is an additional complication in "test-cluster-debug-port.js" which for reasons that are unclear refuses to run if any arguments are passed to the process. I've simply relaxed this requirement.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@stefanmb
test: allow passing args to executable
35348a3
Add --node-args option that will pass arguments.
@stefanmb stefanmb mentioned this pull request Feb 23, 2016
crypto: Improve control of FIPS mode #5181
Closed
@stefanmb

stefanmb commented Feb 23, 2016

Copy link
Copy Markdown
Contributor Author

@indutny @mhdawson I'd appreciate any comments regarding the impact on #5181, thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mscdex mscdex added the test Issues and PRs related to Node.js core tests and test infrastructure. label Feb 23, 2016
@bnoordhuis

bnoordhuis commented Feb 23, 2016

Copy link
Copy Markdown
Member

LGTM. Maybe break up the long line. CI: https://ci.nodejs.org/job/node-test-pull-request/1731/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123

Fishrock123 commented Feb 23, 2016

Copy link
Copy Markdown
Contributor

Can't you already pass arguments to node by having a comment at the top of the file ala https://github.com/nodejs/node/blob/master/test/parallel/test-repl-persistent-history.js#L3 ? Am I missing something?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stefanmb

stefanmb commented Feb 23, 2016

Copy link
Copy Markdown
Contributor Author

@Fishrock123 That facility is provided in test/testpy/init.py by statically scanning the source of each file, which is similar to what I'm proposing here, but not identical. The requirement here is to be able to dynamically choose whether to pass a flag to every test, or not, at runtime. Specifically, for FIPS builds (which now default to FIPS off) the test suites have to be run twice, once with FIPS off, and once with FIPS on. This can be achieved by passing --enable-fips to the Node executable under test, using the "additional_flags" variable already present in test/testpy/init.py

Further details are included in #5181.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stefanmb
WIP: Split line at 80 chars
e331360
@Fishrock123

Fishrock123 commented Feb 23, 2016

Copy link
Copy Markdown
Contributor

Ah, makes sense. 👌

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stefanmb

stefanmb commented Feb 23, 2016

Copy link
Copy Markdown
Contributor Author

@bnoordhuis I split the function signature as indicated, thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Feb 23, 2016

Copy link
Copy Markdown
Member

As much as I dislike adding more stuff to test.py, it's hard to argue with the need here. LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson

mhdawson commented Feb 25, 2016

Copy link
Copy Markdown
Member

LGTM. going to land

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson mhdawson self-assigned this Feb 25, 2016
@mhdawson

mhdawson commented Feb 25, 2016

Copy link
Copy Markdown
Member

CI run - https://ci.nodejs.org/job/node-test-pull-request/1751/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson

mhdawson commented Feb 25, 2016

Copy link
Copy Markdown
Member

Only one failure in CI which is unrelated to this change - reopened #5184 and added link to failure

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mhdawson pushed a commit that referenced this pull request Feb 25, 2016
@stefanmb @mhdawson
test: allow passing args to executable
23a584d
Add --node-args option that will pass arguments.

PR-URL: #5376
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
@mhdawson

mhdawson commented Feb 25, 2016

Copy link
Copy Markdown
Member

Landed as 23a584d

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson mhdawson closed this Feb 25, 2016
@mhdawson mhdawson mentioned this pull request Feb 26, 2016
gc tests don't run properly #5442
Closed
@stefanmb stefanmb mentioned this pull request Feb 26, 2016
test: fix test runner arg regression #5446
Closed
@stefanmb

stefanmb commented Feb 26, 2016

Copy link
Copy Markdown
Contributor Author

This PR introduced a regression that is fixed in #5446.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rvagg pushed a commit that referenced this pull request Feb 27, 2016
@stefanmb @rvagg
test: allow passing args to executable
1082bce
Add --node-args option that will pass arguments.

PR-URL: #5376
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
rvagg pushed a commit that referenced this pull request Feb 27, 2016
@stefanmb @rvagg
test: allow passing args to executable
479a43c
Add --node-args option that will pass arguments.

PR-URL: #5376
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
@rvagg rvagg mentioned this pull request Feb 27, 2016
FIPS tests failing on v5.x #5465
Closed
@Fishrock123 Fishrock123 mentioned this pull request Mar 1, 2016
Release proposal: v5.7.1 #5464
Merged
5 tasks done
@jasnell jasnell added the dont-land-on-v4.x label Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@mhdawson mhdawson

Labels

test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@stefanmb @bnoordhuis @Fishrock123 @Trott @mhdawson @mscdex @jasnell
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.