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 5AUTHOR = "Chrome OS Team" 6NAME = "video_PowerConsumption.webrtc" 7TIME = "MEDIUM" 8TEST_CATEGORY = "Performance" 9TEST_CLASS = "video" 10ATTRIBUTES = "suite:bvt-perbuild" 11TEST_TYPE = "server" 12DEPENDENCIES = "rpm, power:battery, hw_video_acc_vp8" 13BUG_TEMPLATE = { 14 "labels": ["OS-Chrome", "VideoTestFailure"], 15} 16 17DOC = """ 18This test outputs the power consumption of WebRTC to the performance dashboard. 19The purpose is to watch the regression. 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("video_WebRtcPerf", 37 decode_time_test=False, 38 cpu_test=False, 39 power_test=True) 40 finally: 41 client.power_on() 42 43 44job.parallel_on_machines(_run_client_test, machines) 45