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

test: add ability to skip common flag checks #27254

Closed
wants to merge 2 commits into from

Conversation

addaleax
Copy link
Member

Currently, common/index.js checks that our test files are
spawned with the flags specified in // Flags:, and re-spawns
with them if they are not found.

This can be very annoying, for example when debugging using
debuggers that attach to the parent process, or when intentionally
testing with flags that are different from the specified ones.

This adds a NODE_SKIP_FLAG_CHECK environment variable check.
Setting it to a non-empty value will skip the flag checks altogether.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Currently, `common/index.js` checks that our test files are
spawned with the flags specified in `// Flags:`, and re-spawns
with them if they are not found.

This can be *very* annoying, for example when debugging using
debuggers that attach to the parent process, or when intentionally
testing with flags that are different from the specified ones.

This adds a `NODE_SKIP_FLAG_CHECK` environment variable check.
Setting it to a non-empty value will skip the flag checks altogether.
@addaleax addaleax requested a review from BridgeAR April 16, 2019 11:05
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 16, 2019
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe even add a comment about the env in the comment that the process is spawned as child?

test/common/index.js Show resolved Hide resolved
@addaleax
Copy link
Member Author

Maybe even add a comment about the env in the comment that the process is spawned as child?

@BridgeAR Done, PTAL

@BridgeAR
Copy link
Member

BridgeAR commented Apr 16, 2019

Still LGTM. Thanks for adding the comment.

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 16, 2019
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@ZYSzys
Copy link
Member

ZYSzys commented Apr 19, 2019

Landed in 02885da 🎉

@ZYSzys ZYSzys closed this Apr 19, 2019
ZYSzys pushed a commit that referenced this pull request Apr 19, 2019
Currently, `common/index.js` checks that our test files are
spawned with the flags specified in `// Flags:`, and re-spawns
with them if they are not found.

This can be *very* annoying, for example when debugging using
debuggers that attach to the parent process, or when intentionally
testing with flags that are different from the specified ones.

This adds a `NODE_SKIP_FLAG_CHECK` environment variable check.
Setting it to a non-empty value will skip the flag checks altogether.

PR-URL: #27254
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants