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

tools: allow running test.py without configuring #16621

Merged
merged 1 commit into from
Nov 20, 2017

Conversation

gibfahn
Copy link
Member

@gibfahn gibfahn commented Oct 30, 2017

If config.gypi isn't defined, assume Node was build the default way,
i.e. with the inspector.

Refs: #16436 (comment)

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

test

@gibfahn gibfahn requested a review from danbev October 30, 2017 18:50
@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. labels Oct 30, 2017
@gibfahn gibfahn force-pushed the test-no-config branch 2 times, most recently from 6dd1b67 to 9cc9544 Compare October 30, 2017 18:51
@gibfahn
Copy link
Member Author

gibfahn commented Oct 30, 2017

tools/test.py Outdated
config_gypi = ast.literal_eval(s)
return config_gypi['variables']['v8_enable_inspector']

try:
Copy link
Contributor

Choose a reason for hiding this comment

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

why not replace with exec(vm + '-p process.config.variables.v8_enable_inspector')

Copy link
Member

Choose a reason for hiding this comment

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

Not for this PR but I wonder if we should add the inspector to process.features.

@Trott Trott added the python PRs and issues that require attention from people who are familiar with Python. label Nov 1, 2017
@gibfahn
Copy link
Member Author

gibfahn commented Nov 2, 2017

@refack good idea, implemented.

cc/ @nodejs/testing @nodejs/python

@refack
Copy link
Contributor

refack commented Nov 2, 2017

implemented.

Someone should finish with nodejs/build#879 so we could CI this 🙄

@gibfahn
Copy link
Member Author

gibfahn commented Nov 3, 2017

has_inspector = Execute([vm,
"-p", "process.config.variables.v8_enable_inspector"], context)
if has_inspector.stdout.rstrip() == "0":
context.v8_enable_inspector = False
Copy link
Member

Choose a reason for hiding this comment

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

Does this set context.v8_enable_inspector if process.config.variables.v8_enable_inspector is falsy?

Copy link
Member Author

Choose a reason for hiding this comment

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

Only if it's specifically 0, not just generally falsy.

Copy link
Member

Choose a reason for hiding this comment

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

I guess this is okay as long as the only valid values for process.config.variables.v8_enable_inspector are 0 and non-zero.

Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICT possible values are 0, 1 with undefined in v6 and v4.

Copy link
Contributor

Choose a reason for hiding this comment

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

For v6 it's process.config.variables.v8_inspector

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, I'd be inclined to leave this as is here, and just not backport to 4.x and 6.x. Seem reasonable?

Copy link
Member

Choose a reason for hiding this comment

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

The V8 inspector support isn't in v4.x so no need to backport there.

@gibfahn
Copy link
Member Author

gibfahn commented Nov 13, 2017

@refack
Copy link
Contributor

refack commented Nov 14, 2017

(ignore the centos6 fails)

If config.gypi isn't defined, assume Node was build the default way,
i.e. with the inspector.

PR-URL: nodejs#16621
Refs: nodejs#16436 (comment)
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@gibfahn gibfahn force-pushed the test-no-config branch 2 times, most recently from aba2e63 to ad1967d Compare November 20, 2017 15:27
@gibfahn gibfahn merged commit ad1967d into nodejs:master Nov 20, 2017
@gibfahn gibfahn deleted the test-no-config branch November 20, 2017 17:22
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
If config.gypi isn't defined, assume Node was build the default way,
i.e. with the inspector.

PR-URL: #16621
Refs: #16436 (comment)
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 12, 2017
@MylesBorins
Copy link
Contributor

This doesn't land cleanly on v6.x-staging, would you be willing to manually backport

gibfahn added a commit that referenced this pull request Dec 19, 2017
If config.gypi isn't defined, assume Node was build the default way,
i.e. with the inspector.

PR-URL: #16621
Refs: #16436 (comment)
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
gibfahn added a commit that referenced this pull request Dec 20, 2017
If config.gypi isn't defined, assume Node was build the default way,
i.e. with the inspector.

PR-URL: #16621
Refs: #16436 (comment)
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
@gibfahn
Copy link
Member Author

gibfahn commented Jan 16, 2018

This doesn't need to be backported as the relevant commit from #11631 wasn't backported.

If the rest of that PR gets backported we should include this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python PRs and issues that require attention from people who are familiar with Python. test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants