tools run-cts: Add --coverage flag

Displays a per-test coverage viewer in your browser

Change-Id: I0b808bfadf01dab0540143760580cd7ca680e93b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113644
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2022-12-13 09:34:24 +00:00
committed by Dawn LUCI CQ
parent 8ac417c39c
commit 60dc70df71
3 changed files with 825 additions and 46 deletions

View File

@@ -64,6 +64,13 @@ type Git struct {
// New returns a new Git instance
func New(exe string) (*Git, error) {
if exe == "" {
g, err := exec.LookPath("git")
if err != nil {
return nil, fmt.Errorf("failed to find git: %v", err)
}
exe = g
}
if _, err := os.Stat(exe); err != nil {
return nil, err
}