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 = "video_PowerConsumption.vp9" 7TIME = "MEDIUM" 8TEST_CATEGORY = "Performance" 9TEST_CLASS = "video" 10ATTRIBUTES = "suite:bvt-perbuild, suite:crosbolt_perf_perbuild" 11TEST_TYPE = "server" 12DEPENDENCIES = "power:battery" 13BUG_TEMPLATE = { 14 "labels": ["OS-Chrome", "VideoTestFailure"], 15 "cc": ["chromeos-video-test-failures@google.com"], 16} 17 18DOC = """ 19The test outputs the video power consumption for VP9 video decode. 20""" 21 22import logging 23 24from autotest_lib.client.common_lib import error 25 26 27VIDEO_NAME = "traffic/traffic-1920x1080-83a1e5f8b7944577425f039034e64c76.vp9.webm" 28VIDEO_DESCRIPTION = "vp9_1080p" 29 30def _run_client_test(machine): 31 """Runs client test with battery actively discharging.""" 32 client = hosts.create_host(machine) 33 if not client.has_power(): 34 raise error.TestError("This test requires RPM support.") 35 36 try: 37 client.power_off() 38 client_at = autotest.Autotest(client) 39 client_at.run_test("video_PlaybackPerf", video_name=VIDEO_NAME, 40 video_description=VIDEO_DESCRIPTION, 41 capability='hw_dec_vp9_1080_30', power_test=True) 42 finally: 43 client.power_on() 44 45 46job.parallel_on_machines(_run_client_test, machines) 47