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

@@ -168,10 +168,10 @@ func (g *Gerrit) CreateChange(project, branch, subject string, wip bool) (*Chang
return change, nil
}
// EditFiles replaces the content of the files in the given change.
// EditFiles replaces the content of the files in the given change. It deletes deletedFiles.
// If newCommitMsg is not an empty string, then the commit message is replaced
// with the string value.
func (g *Gerrit) EditFiles(changeID, newCommitMsg string, files map[string]string) (Patchset, error) {
func (g *Gerrit) EditFiles(changeID, newCommitMsg string, files map[string]string, deletedFiles []string) (Patchset, error) {
if newCommitMsg != "" {
resp, err := g.client.Changes.ChangeCommitMessageInChangeEdit(changeID, &gerrit.ChangeEditMessageInput{
Message: newCommitMsg,
@@ -186,6 +186,12 @@ func (g *Gerrit) EditFiles(changeID, newCommitMsg string, files map[string]strin
return Patchset{}, g.maybeWrapError(err)
}
}
for _, path := range deletedFiles {
resp, err := g.client.Changes.DeleteFileInChangeEdit(changeID, path)
if err != nil && resp.StatusCode != 409 { // 409 no changes were made
return Patchset{}, g.maybeWrapError(err)
}
}
resp, err := g.client.Changes.PublishChangeEdit(changeID, "NONE")
if err != nil && resp.StatusCode != 409 { // 409 no changes were made