blob: e2008614162f94ca923bcf7f905cb249d8029f99 [file] [log] [blame]
# Copyright (c) 2014 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 = "video_PowerConsumption.h264"
TIME = "MEDIUM"
TEST_CATEGORY = "Performance"
TEST_CLASS = "video"
SUITE = "video"
TEST_TYPE = "server"
DEPENDENCIES = "rpm, power:battery, hw_video_acc_h264"
BUG_TEMPLATE = {
'labels': ['OS-Chrome', 'Cr-OS-Kernel-Video'],
}
DOC = """
The test outputs the video power consumption for H264 video decode.
"""
import logging
from autotest_lib.client.common_lib import error
VIDEO_NAME = 'big_buck_bunny_trailer_1080p.mp4'
VIDEO_FORMAT = 'h264'
def _run_client_test(machine):
"""Runs client test with battery actively discharging."""
client = hosts.create_host(machine)
if not client.has_power():
msg = 'This test requires RPM support.'
logging.info('********************%s', msg)
raise error.TestError(msg)
client.power_off()
try:
client_at = autotest.Autotest(client)
client_at.run_test('video_PlaybackPower', video_name=VIDEO_NAME,
video_format=VIDEO_FORMAT, tag=VIDEO_FORMAT)
finally:
client.power_on()
job.parallel_on_machines(_run_client_test, machines)