mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 17:35:30 +00:00
tools: More CTS tooling improvements
• Add the included trybots in the CL description. All of these trybots are tested by the roll, but the final CQ-submit wouldn't necessarily test all of the variants before landing. This would mean that the 'cts export' could miss some results, as it takes the last PS with any results. • Add --force flag to cts roll to force a roll. Useful for testing. • Emit timing diagnostics for tests labelled 'Slow' instead of unhelpfully stating they pass. • Enable the --cl and --ps flags for cts export • Export with the most recent data to the top of the spreadsheet Bug: dawn:1401 Change-Id: Id926367ab805bfb9f3032fce9cce7f00daf7a5d4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88661 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
923dd16545
commit
8495affacf
@@ -19,6 +19,7 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"dawn.googlesource.com/dawn/tools/src/container"
|
||||
"dawn.googlesource.com/dawn/tools/src/cts/query"
|
||||
@@ -337,10 +338,27 @@ func (u *updater) expectation(in Expectation, keep bool) []Expectation {
|
||||
if keep { // Expectation chunk was marked with 'KEEP'
|
||||
// Add a diagnostic if all tests of the expectation were 'Pass'
|
||||
if s := results.Statuses(); len(s) == 1 && s.One() == result.Pass {
|
||||
if c := len(results); c > 1 {
|
||||
u.diag(Note, in.Line, "all %d tests now pass", len(results))
|
||||
if ex := container.NewSet(in.Status...); len(ex) == 1 && ex.One() == string(result.Slow) {
|
||||
// Expectation was 'Slow'. Give feedback on actual time taken.
|
||||
var longest, average time.Duration
|
||||
for _, r := range results {
|
||||
if r.Duration > longest {
|
||||
longest = r.Duration
|
||||
}
|
||||
average += r.Duration
|
||||
}
|
||||
if c := len(results); c > 1 {
|
||||
average /= time.Duration(c)
|
||||
u.diag(Note, in.Line, "longest test took %v (average %v)", longest, average)
|
||||
} else {
|
||||
u.diag(Note, in.Line, "test took %v", longest)
|
||||
}
|
||||
} else {
|
||||
u.diag(Note, in.Line, "test now passes")
|
||||
if c := len(results); c > 1 {
|
||||
u.diag(Note, in.Line, "all %d tests now pass", len(results))
|
||||
} else {
|
||||
u.diag(Note, in.Line, "test now passes")
|
||||
}
|
||||
}
|
||||
}
|
||||
return []Expectation{in}
|
||||
|
||||
Reference in New Issue
Block a user