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: fix parsing test flags #48012

Merged

Conversation

daeyeon
Copy link
Member

@daeyeon daeyeon commented May 15, 2023

This does not replace _ with - when parsing flags.

I believe that it was added for a certain purpose, but it doesn't seem to be needed anymore. Currently, the cli options are not passed as intended in the following cases:

// Flags: --diagnostic-dir=~/PATH_HAS_UNDERSCORES
NOTE: The test started as a child_process using these flags: [ 
  '--diagnostic-dir=~/PATH-HAS-UNDERSCORES' <--
]
// Flags: --experimental-permission --allow-fs-read=~/PATH_HAS_UNDERSCORES
The test started as a child_process using these flags: [
  '--experimental-permission',
  '--allow-fs-read=~/PATH-HAS-UNDERSCORES'  <--
] 

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

This removes replacing `_` with `-` in the flags defined.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels May 15, 2023
Copy link
Member

@MoLow MoLow left a comment

Choose a reason for hiding this comment

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

I did not see any reasoning for this in the original PR adding this: #24876
and it matches the python behavior:

flags_match = FLAGS_PATTERN.search(source)
if flags_match:
flags = flags_match.group(1).strip().split()

so LGTM

@daeyeon daeyeon added the request-ci Add this label to start a Jenkins CI on a PR. label May 15, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 15, 2023
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@daeyeon daeyeon added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels May 16, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 17, 2023
@nodejs-github-bot nodejs-github-bot merged commit 5cb5422 into nodejs:main May 17, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 5cb5422

targos pushed a commit that referenced this pull request May 30, 2023
This removes replacing `_` with `-` in the flags defined.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: #48012
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@targos targos mentioned this pull request Jun 4, 2023
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
This removes replacing `_` with `-` in the flags defined.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: #48012
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
This removes replacing `_` with `-` in the flags defined.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: nodejs#48012
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@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. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants