blob: f9fbc3e3dfdf71be824535d0ca19064425f9a80e [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package graphics
import (
"context"
"time"
"chromiumos/tast/local/crostini"
"chromiumos/tast/local/graphics/trace"
"chromiumos/tast/local/graphics/trace/comm"
"chromiumos/tast/local/graphics/trace/guestos"
"chromiumos/tast/testing"
)
func init() {
testing.AddTest(&testing.Test{
Func: TraceReplay,
LacrosStatus: testing.LacrosVariantUnknown,
Desc: "Replay glxgears trace file in Crostini VM",
Contacts: []string{"chromeos-gfx@google.com", "tutankhamen@google.com", "ddmail@google.com", "ihf@google.com"},
SoftwareDeps: []string{"chrome", "crosvm_gpu", "no_borealis_host", "vm_host", "no_qemu"},
// We assign it to two different group in order to run it against pool:suite and pool:cros_av_analysis.
// b/218604048: test breaking in CQ, marking as informational.
Attr: []string{"group:mainline", "group:graphics", "graphics_trace", "graphics_perbuild", "graphics_av_analysis", "informational"},
Vars: []string{"keepState", "ui.gaiaPoolDefault"},
Params: []testing.Param{
// Parameters generated by trace_replay_test.go. DO NOT EDIT.
{
Name: "glxgears_stable",
ExtraData: []string{crostini.GetContainerMetadataArtifact("buster", false), crostini.GetContainerRootfsArtifact("buster", false)},
ExtraSoftwareDeps: []string{"dlc"},
ExtraHardwareDeps: trace.HwDepsStable,
Pre: crostini.StartedByDlcBuster(),
Timeout: 15 * time.Minute,
Val: comm.TestGroupConfig{
Labels: []string{"short"},
Repository: comm.RepositoryInfo{
RootURL: "gs://chromiumos-test-assets-public/tast/cros/graphics/traces/repo",
Version: 1,
},
},
}, {
Name: "glxgears_unstable",
ExtraAttr: []string{"informational"},
ExtraData: []string{crostini.GetContainerMetadataArtifact("buster", false), crostini.GetContainerRootfsArtifact("buster", false)},
ExtraSoftwareDeps: []string{"dlc"},
ExtraHardwareDeps: trace.HwDepsUnstable,
Pre: crostini.StartedByDlcBuster(),
Timeout: 15 * time.Minute,
Val: comm.TestGroupConfig{
Labels: []string{"short"},
Repository: comm.RepositoryInfo{
RootURL: "gs://chromiumos-test-assets-public/tast/cros/graphics/traces/repo",
Version: 1,
},
},
},
},
})
}
// TraceReplay replays a graphics trace inside a crostini container.
func TraceReplay(ctx context.Context, s *testing.State) {
guestos.TraceReplayCrostiniSetup(ctx, s, 0)
}