Commit b3c1e71e by Nicolas Capens

Regres: List regressions before summary

Previously we had to click on the Gerrit comment posted by Regres to unfold the single-line snippet into the full comment, to check whether any regressions occured. This change makes "--- No change in test results ---" come first so we can see at a glance without opening the full comment that no regressions have occured, or be informed about changes in test results. Change-Id: Ia4d9bbb0f1db81df943c009af91fc43c9b71ade7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/48928Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent 16636f48
......@@ -1333,6 +1333,31 @@ func compare(old, new *deqp.Results) (msg string, alert bool) {
}
}
if n := len(broken); n > 0 {
sort.Strings(broken)
sb.WriteString(fmt.Sprintf("\n--- This change breaks %d tests: ---\n", n))
list(broken)
}
if n := len(fixed); n > 0 {
sort.Strings(fixed)
sb.WriteString(fmt.Sprintf("\n--- This change fixes %d tests: ---\n", n))
list(fixed)
}
if n := len(removed); n > 0 {
sort.Strings(removed)
sb.WriteString(fmt.Sprintf("\n--- This change removes %d tests: ---\n", n))
list(removed)
}
if n := len(changed); n > 0 {
sort.Strings(changed)
sb.WriteString(fmt.Sprintf("\n--- This change alters %d tests: ---\n", n))
list(changed)
}
if len(broken) == 0 && len(fixed) == 0 && len(removed) == 0 && len(changed) == 0 {
sb.WriteString(fmt.Sprintf("\n--- No change in test results ---\n"))
}
sb.WriteString(fmt.Sprintf(" Total tests: %d\n", totalTests))
for _, s := range []struct {
label string
......@@ -1379,31 +1404,6 @@ func compare(old, new *deqp.Results) (msg string, alert bool) {
}
}
if n := len(broken); n > 0 {
sort.Strings(broken)
sb.WriteString(fmt.Sprintf("\n--- This change breaks %d tests: ---\n", n))
list(broken)
}
if n := len(fixed); n > 0 {
sort.Strings(fixed)
sb.WriteString(fmt.Sprintf("\n--- This change fixes %d tests: ---\n", n))
list(fixed)
}
if n := len(removed); n > 0 {
sort.Strings(removed)
sb.WriteString(fmt.Sprintf("\n--- This change removes %d tests: ---\n", n))
list(removed)
}
if n := len(changed); n > 0 {
sort.Strings(changed)
sb.WriteString(fmt.Sprintf("\n--- This change alters %d tests: ---\n", n))
list(changed)
}
if len(broken) == 0 && len(fixed) == 0 && len(removed) == 0 && len(changed) == 0 {
sb.WriteString(fmt.Sprintf("\n--- No change in test results ---\n"))
}
type timingDiff struct {
old time.Duration
new time.Duration
......
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