Repository navigation
testing: enable per-test coverage in the selfhost test provider - #212325
Merged
4 commits merged intoMay 10, 2024
Merged
4 commits merged into
4 commits merged into
Conversation
Connor Peet (connor4312)
force-pushed
the
connor4312/212196-2
branch
from
May 9, 2024 03:57
469c2fa to
41f6f5a
Compare
Benjamin Pasero (bpasero)
previously approved these changes
May 9, 2024
Connor Peet (connor4312)
force-pushed
the
connor4312/212196-2
branch
from
May 9, 2024 18:38
f38ac03 to
5447d0d
Compare
roblourens
reviewed
May 9, 2024
| { | ||
| "configurations": [ | ||
| { | ||
| "args": ["--extensionDevelopmentPath=${workspaceFolder}"], |
Member
There was a problem hiding this comment.
That's needed when debugging the extension?
roblourens
approved these changes
May 9, 2024
Sharifah Al- Binali (ALbnli)
approved these changes
May 9, 2024
1facdf8
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In this PR, we use the webContents.debugger to take a profile around each individual test to emit V8 incremental coverage each time a test is run. We now handle this manually in the selfhost test provider: we keep each incremental coverage output and also combine it into the overall coverage for the file. A lot of this is munging around with the V8 coverage format.
Also, in learning more about the format, I realized why branches were not always emitted well in
c8's data: V8 doesn't actually emit branch information, and it just guesses at where branches are! For simplicity's sake, I don't do any guessing and treat everything as statement coverage.Later this iteration as the API stabilizes a bit I expect to extract this logic into its own package to be shared between my (and others') various V8-based test runners. Maybe at that point I'll do some smartness to restore branch coverage information based on a AST parsing of the source?
No auto merge here since it requires the next Insiders to work properly.