test_runner: exclude branches leading to ignored lines from lcov output#61894
Open
realMelTuc wants to merge 3 commits intonodejs:mainfrom
Open
test_runner: exclude branches leading to ignored lines from lcov output#61894realMelTuc wants to merge 3 commits intonodejs:mainfrom
realMelTuc wants to merge 3 commits intonodejs:mainfrom
Conversation
Previously, the test runner accessed process.argv and process.cwd() directly in runner.js. This change captures these values in test_runner.js (the entry point) and passes them through the options object to runner.js. Fixes: nodejs#53867
- Change 'seperately' to 'separately' - Change 'paramater' to 'parameter' These are documentation fixes in the changelog files.
When a line is ignored with , branches leading to that line should also be excluded from the lcov output. Previously, the branch entries (BRDA) were still being output even for branches that led to ignored lines, causing incorrect branch coverage calculations. This fix filters out branches whose target line is not in the included lines set (i.e., lines that were ignored), and updates the branch count summaries accordingly. Fixes: nodejs#61586
Collaborator
|
Review requested:
|
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 a line is ignored with
/* node:coverage ignore next */, branches leading to that line should also be excluded from the lcov output.Previously, the branch entries (BRDA) were still being output even for branches that led to ignored lines, causing incorrect branch coverage calculations.
This fix filters out branches whose target line is not in the included lines set (i.e., lines that were ignored), and updates the branch count summaries accordingly.
Fixes: #61586