-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Support // Env in the python test runner #58179
Copy link
Copy link
Closed
Labels
testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
Description
Activity
Metadata
Metadata
Assignees
Labels
testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.toolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
Something I found very useful in V8's test runner (our Python test runner is a fork of a very old version of this) is the support of the
// Environment variablescomment (similar to the// Flagscomment, this instructs the test runner to pass a particular flag when running the test)node/deps/v8/test/intl/default_locale.js
Line 5 in 7b48713
The way it's implemented in V8 can be found in e.g. here
node/deps/v8/test/intl/testcfg.py
Line 34 in 17a74dd
We can probably just port similar logic to our fork in e.g. here
node/test/testpy/__init__.py
Line 61 in a790901
It would be handy to leave more logs in flaky tests via the use of
// Env: NODE_DEBUG=fooor// Env: NODE_DEBUG_NATIVE=foo- trying to set the flag in the entire test job or the entire test suite would be uncanny since many tests also check that stdout/stderr is empty, and we probably only want to do this for selected flaky tests that don't care about stdout/stderr so that they leave more traces in the CI logs. This would also help simplifying many tests that only spawn child processes to customize the environment varaibles.