mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user