| # Copyright 2015 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. |
| |
| AUTHOR = "Chrome OS Team" |
| NAME = "graphics_PowerConsumption.WebGLAquarium" |
| TIME = "MEDIUM" |
| TEST_CATEGORY = "Performance" |
| TEST_CLASS = "graphics" |
| ATTRIBUTES = "suite:bvt-perbuild" |
| SUITE = "bvt-perbuild" |
| TEST_TYPE = "server" |
| DEPENDENCIES = "rpm, power:battery" |
| BUG_TEMPLATE = { |
| "labels": ["OS-Chrome", "Cr-OS-Kernel-Graphics"], |
| } |
| |
| DOC = """ |
| The test outputs the power consumption for WebGL Aquarium gfx demo. |
| """ |
| |
| import logging |
| |
| from autotest_lib.client.common_lib import error |
| |
| |
| def _run_client_test(machine): |
| """Runs client test with battery actively discharging.""" |
| client = hosts.create_host(machine) |
| if not client.has_power(): |
| raise error.TestError("This test requires RPM support.") |
| |
| client.power_off() |
| try: |
| client_at = autotest.Autotest(client) |
| client_at.run_test("graphics_WebGLAquarium", power_test=True) |
| finally: |
| client.power_on() |
| |
| |
| job.parallel_on_machines(_run_client_test, machines) |