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

commented Apr 16, 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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
test: add ability to skip common flag checks
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 Apr 16, 2019

@nodejs-github-bot

This comment has been minimized.

@BridgeAR
Copy link
Member

left a comment

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

Show resolved Hide resolved test/common/index.js
@addaleax

This comment has been minimized.

Copy link
Member Author

commented Apr 16, 2019

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

@BridgeAR Done, PTAL

@BridgeAR

This comment has been minimized.

Copy link
Member

commented Apr 16, 2019

Still LGTM. Thanks for adding the comment.

@nodejs-github-bot

This comment has been minimized.

@lpinca

lpinca approved these changes Apr 16, 2019

@nodejs-github-bot

This comment has been minimized.

@ZYSzys

This comment has been minimized.

Copy link
Member

commented Apr 19, 2019

Landed in 02885da 🎉

@ZYSzys ZYSzys closed this Apr 19, 2019

ZYSzys added a commit that referenced this pull request Apr 19, 2019

test: add ability to skip common flag checks
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
You can’t perform that action at this time.