Home | History | Annotate | Download | only in graphics_PowerConsumption
      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 
      5 AUTHOR = "Chrome OS Team"
      6 NAME = "graphics_PowerConsumption.WebGLAquarium"
      7 TIME = "MEDIUM"
      8 TEST_CATEGORY = "Performance"
      9 TEST_CLASS = "graphics"
     10 ATTRIBUTES = "suite:bvt-perbuild"
     11 SUITE = "bvt-perbuild"
     12 TEST_TYPE = "server"
     13 DEPENDENCIES = "rpm, power:battery"
     14 BUG_TEMPLATE = {
     15     "labels": ["OS-Chrome", "Cr-OS-Kernel-Graphics"],
     16 }
     17 
     18 DOC = """
     19 The test outputs the power consumption for WebGL Aquarium gfx demo.
     20 """
     21 
     22 import logging
     23 
     24 from autotest_lib.client.common_lib import error
     25 
     26 
     27 def _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     client.power_off()
     34     try:
     35         client_at = autotest.Autotest(client)
     36         client_at.run_test("graphics_WebGLAquarium", power_test=True)
     37     finally:
     38         client.power_on()
     39 
     40 
     41 job.parallel_on_machines(_run_client_test, machines)
     42