test_runner: use run() options with isolation="none"#62269
Open
inukshuk wants to merge 2 commits into
Open
Conversation
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62269 +/- ##
==========================================
+ Coverage 90.03% 90.05% +0.01%
==========================================
Files 714 714
Lines 225352 225364 +12
Branches 42599 42612 +13
==========================================
+ Hits 202905 202948 +43
+ Misses 14236 14190 -46
- Partials 8211 8226 +15
🚀 New features to boost your workflow:
|
When using run() programatically with isolation="none", testNamePatterns, testSkipPattersn, and only were ignored. This combination of options only worked when set via CLI flags, because parseCommandLine() is still used to seed globalOptions.
8637ae0 to
4aa5683
Compare
Author
|
I rebased this on For added context, I'm working with the test runner in Electron where there are substantial differences to the process model and it would be very helpful to have all the run() options available even with isolation turned off. Happy to explore this further/differently if that would be preferable. |
Ethan-Arrowood
approved these changes
May 15, 2026
Member
|
The commit is missing the signoff. |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using
run()programatically with isolation="none",testNamePatterns,testSkipPatterns, andonlywere ignored. This combination of options only worked when set via CLI flags, becauseparseCommandLine()is still used to seedglobalOptions.Closes #57399
This is almost the same as #58496 which was my starting point for this. The original PR did not address
only, which is equally missing. It also did not overwrite the options if they were already inglobalOptions: the only way for them to be there is viaparseCommandLine()above. However, I believe we need to always override them. Whenrun()is used in code with these options, I'd always expect them to take effect and this is also what already happens with isolation="process", which forward the run() options to the child process not the CLI ones.This also uses a fixture for running the tests as was requested in the original PR.
The test spawns a child process, because running a test within the currently running test without isolation is problematic (tests would hang for me, could be related to #57394 but it's arguably not something that should be done).