• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.hw_hangout.vp8"
7TIME = "MEDIUM"
8TEST_CATEGORY = "Performance"
9TEST_CLASS = "video"
10ATTRIBUTES = "suite:bvt-perbuild"
11SUITE = "bvt-perbuild"
12TEST_TYPE = "server"
13DEPENDENCIES = "rpm, power:battery, hw_video_acc_vp8, hw_video_ac_enc_vp8"
14BUG_TEMPLATE = {
15    "labels": ["OS-Chrome", "VideoTestFailure"],
16}
17
18DOC = """
19The test outputs the video power consumption for vp8 video decode.
20"""
21
22import logging
23
24from autotest_lib.client.common_lib import error
25
26# Used resources. They will be download in the beginning of the test.
27resources = [
28    'crowd/crowd720-41e9a3e6a6b1644ebdb3f5723fce96e5.vp8',
29    'crowd/crowd180-bde69ca71393033d9187a2833720c9f8.vp8',
30    'crowd/crowd720-3cfe7b096f765742b4aa79e55fe7c994.yuv',
31    'crowd/crowd360-e84aac15c05b9b19250f3fc97722e0f6.yuv',
32    'crowd/crowd180-6d71fa96da062037482619df31830a97.yuv']
33
34# The videos to be decoded. Each entry consists of the following parts:
35#   [vidoe_name, width, height, frame_num, fragment_num, profile]
36decode_videos  = [['crowd720.vp8', 1280, 720, 500, 502, 11]]
37decode_videos += [['crowd180.vp8', 320, 180, 500, 502, 11]] * 4
38
39# The videos to be encoded.
40#   [video_name, width, height, profile, bit_rate]
41encode_videos = [
42    ['crowd720.yuv', 1280, 720, 11, 1200000],
43    ['crowd360.yuv', 640, 360, 11, 500000],
44    ['crowd180.yuv', 320, 180, 11, 100000]]
45
46
47def _run_client_test(machine):
48    """Runs client test with battery actively discharging."""
49    client = hosts.create_host(machine)
50    if not client.has_power():
51        raise error.TestError("This test requires RPM support.")
52
53    client.power_off()
54    try:
55        client_at = autotest.Autotest(client)
56        client_at.run_test(
57                'video_HangoutHardwarePerf', resources=resources,
58                decode_videos=decode_videos, encode_videos=encode_videos,
59                measurement='power')
60    finally:
61        client.power_on()
62
63
64job.parallel_on_machines(_run_client_test, machines)
65