1 # Copyright (c) 2014 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 = "video_PowerConsumption.webrtc" 7 TIME = "MEDIUM" 8 TEST_CATEGORY = "Performance" 9 TEST_CLASS = "video" 10 ATTRIBUTES = "suite:bvt-perbuild" 11 SUITE = "bvt-perbuild" 12 TEST_TYPE = "server" 13 DEPENDENCIES = "rpm, power:battery, hw_video_acc_vp8" 14 BUG_TEMPLATE = { 15 "labels": ["OS-Chrome", "VideoTestFailure"], 16 } 17 18 DOC = """ 19 This test outputs the power consumption of WebRTC to the performance dashboard. 20 The purpose is to watch the regression. 21 """ 22 23 import logging 24 25 from autotest_lib.client.common_lib import error 26 27 28 def _run_client_test(machine): 29 """Runs client test with battery actively discharging.""" 30 client = hosts.create_host(machine) 31 if not client.has_power(): 32 raise error.TestError("This test requires RPM support.") 33 34 client.power_off() 35 try: 36 client_at = autotest.Autotest(client) 37 client_at.run_test("video_WebRtcPerf", 38 decode_time_test=False, 39 cpu_test=False, 40 power_test=True) 41 finally: 42 client.power_on() 43 44 45 job.parallel_on_machines(_run_client_test, machines) 46