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: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/tests/regres/cmd/regres/main.go b/tests/regres/cmd/regres/main.go index be074c8..2bfc497 100644 --- a/tests/regres/cmd/regres/main.go +++ b/tests/regres/cmd/regres/main.go
@@ -976,6 +976,7 @@ 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 @@ 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 {