Commit c5d08140 by Nicolas Capens Committed by Nicolas Capens

Regres: Don't test changes with negative scores

This allows authors as well as reviewers to avoid wasting CPU cycles on changes which require revision or won't be accepted. Change-Id: I57946609462149d29229b613d0a4c68a21ccb154 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46548 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent 97f99232
......@@ -976,6 +976,7 @@ func (c *changeInfo) update(client *gerrit.Client) error {
codeReviewScore := change.Labels["Code-Review"].Value
codeReviewApproved := change.Labels["Code-Review"].Approved.AccountID != 0
presubmitReady := change.Labels["Presubmit-Ready"].Approved.AccountID != 0
verifiedScore := change.Labels["Verified"].Value
c.priority = 0
if presubmitReady {
......@@ -995,6 +996,13 @@ func (c *changeInfo) update(client *gerrit.Client) error {
strings.HasSuffix(change.Labels["Code-Review"].Recommended.Email, "@google.com") ||
strings.HasSuffix(change.Labels["Presubmit-Ready"].Approved.Email, "@google.com")
// Don't test if the change has negative scores.
if canTest {
if codeReviewScore < 0 || verifiedScore < 0 {
canTest = false
}
}
// Has the latest patchset already been tested?
if canTest {
for _, msg := range change.Messages {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment