Skip to content

test_runner: capture process state in entry point instead of runner - #65915

Closed
krsnaSuraj wants to merge 1 commit into
nodejs:mainfrom
krsnaSuraj:fix/53867-capture-process-state-in-entry-point
Closed

test_runner: capture process state in entry point instead of runner#65915
krsnaSuraj wants to merge 1 commit into
nodejs:mainfrom
krsnaSuraj:fix/53867-capture-process-state-in-entry-point

Conversation

@krsnaSuraj

Copy link
Copy Markdown

Moves process.* reads (process.argv, process.env, process.cwd) from runner.js to the CLI entry point (main/test_runner.js), so that runner.js can be loaded without side effects in snapshot environments.

The execArgv case is handled via a fallback in getRunArgs(): when no execArgv is passed in options, process.execArgv is still read directly to propagate V8-only flags to child processes.

Supersedes #64446 (which GitHub auto-closed after a force-push).

Refs: #56131

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

krsnaSuraj pushed a commit to krsnaSuraj/node that referenced this pull request Sep 8, 2026
Move process.* reads (process.argv, process.env, process.cwd) from
runner.js to the CLI entry point (main/test_runner.js), so that runner.js
can be loaded without side effects in snapshot environments.

The execArgv case is handled via a fallback in getRunArgs(): when no
execArgv is passed in options, process.execArgv is still read directly
to propagate V8-only flags to child processes.

PR-URL: nodejs#65915
Refs: nodejs#56131
@krsnaSuraj
krsnaSuraj force-pushed the fix/53867-capture-process-state-in-entry-point branch from e34b465 to e71c440 Compare September 8, 2026 17:20
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

krsnaSuraj pushed a commit to krsnaSuraj/node that referenced this pull request Sep 8, 2026
Move process.* reads (process.argv, process.env, process.cwd) from
runner.js to the CLI entry point (main/test_runner.js), so that runner.js
can be loaded without side effects in snapshot environments.

The execArgv case is handled via a fallback in getRunArgs(): when no
execArgv is passed in options, process.execArgv is still read directly
to propagate V8-only flags to child processes.

PR-URL: nodejs#65915
Refs: nodejs#56131
Signed-off-by: Krsna Suraj <krsnasuraj@gmail.com>
@krsnaSuraj
krsnaSuraj force-pushed the fix/53867-capture-process-state-in-entry-point branch from e71c440 to ea13c78 Compare September 8, 2026 17:27
Move process.* reads (process.argv, process.env, process.cwd) from
runner.js to the CLI entry point (main/test_runner.js), so that
runner.js can be loaded without side effects in snapshot environments.

The execArgv case is handled via a fallback in getRunArgs(): when no
execArgv is passed in options, process.execArgv is still read directly
to propagate V8-only flags to child processes.

PR-URL: nodejs#65915
Refs: nodejs#56131
Signed-off-by: Krsna Suraj <krsnasuraj@gmail.com>
@krsnaSuraj
krsnaSuraj force-pushed the fix/53867-capture-process-state-in-entry-point branch from ea13c78 to a1be614 Compare September 8, 2026 18:24
@krsnaSuraj krsnaSuraj closed this Sep 8, 2026
@krsnaSuraj
krsnaSuraj deleted the fix/53867-capture-process-state-in-entry-point branch September 8, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants