• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5AUTHOR = "Chrome OS Team"
6NAME = "graphics_PowerConsumption.WebGLAquarium"
7TIME = "MEDIUM"
8TEST_CATEGORY = "Performance"
9TEST_CLASS = "graphics"
10ATTRIBUTES = "suite:bvt-perbuild"
11TEST_TYPE = "server"
12DEPENDENCIES = "rpm, power:battery"
13BUG_TEMPLATE = {
14    "labels": ["OS-Chrome"],
15    "components": ["OS>Kernel>Graphics"],
16}
17
18DOC = """
19The test outputs the power consumption for WebGL Aquarium gfx demo.
20"""
21
22import logging
23
24from autotest_lib.client.common_lib import error
25
26
27def _run_client_test(machine):
28    """Runs client test with battery actively discharging."""
29    client = hosts.create_host(machine)
30    if not client.has_power():
31        raise error.TestError("This test requires RPM support.")
32
33    try:
34        client.power_off()
35        client_at = autotest.Autotest(client)
36        client_at.run_test("graphics_WebGLAquarium", power_test=True)
37    finally:
38        client.power_on()
39
40
41job.parallel_on_machines(_run_client_test, machines)
42