Update CTS roller to generate reftest/idl test sources

These sources need to be generated in Dawn's source tree
so that Chromium's //third_party/webgpu-cts DEP can be
removed.

Bug: chromium:1333969
Change-Id: I03c8cba691bcbfac00839f0cdd40fab6198ec83f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91060
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Austin Eng
2022-06-10 16:25:43 +00:00
committed by Dawn LUCI CQ
parent 6cc677761d
commit 9d14b164bf
3 changed files with 105 additions and 11 deletions

View File

@@ -70,3 +70,21 @@ func (g *Gitiles) DownloadFile(ctx context.Context, ref, path string) (string, e
}
return res.GetContents(), nil
}
// ListFiles lists the file paths in a project-relative path at the given reference.
func (g *Gitiles) ListFiles(ctx context.Context, ref, path string) ([]string, error) {
res, err := g.client.ListFiles(ctx, &gpb.ListFilesRequest{
Project: g.project,
Committish: ref,
Path: path,
})
if err != nil {
return []string{}, err
}
files := res.GetFiles()
paths := make([]string, len(files))
for i, f := range files {
paths[i] = f.GetPath()
}
return paths, nil
}