1# Copyright 2019 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 5from autotest_lib.server import utils 6from autotest_lib.server.cros.bluetooth import advertisements_data 7 8 9AUTHOR = 'Chrome OS Team' 10NAME = 'bluetooth_AdapterPowerMeasure.suspension' 11PURPOSE = 'Test power consumption of Bluetooth chip during system suspension.' 12CRITERIA = 'Bluetooth chip should consume power less than specified.' 13ATTRIBUTES = 'suite:bluetooth' 14TIME = 'SHORT' # Takes about 2 mins 15TEST_CATEGORY = 'Functional' 16TEST_CLASS = 'bluetooth' 17TEST_TYPE = 'server' 18DEPENDENCIES = 'bluetooth, chameleon:bt_base' 19 20DOC = """ 21This test case verifies that the Bluetooth chip of the DUT does 22not consume power more than specified during system suspension. 23 24This autotest include the following test cases: 25 self.test_case_suspend_power_measurement() 26""" 27 28args_dict = utils.args_to_dict(args) 29chameleon_args = hosts.CrosHost.get_chameleon_arguments(args_dict) 30 31def run(machine): 32 host = hosts.create_host(machine, chameleon_args=chameleon_args) 33 job.run_test('bluetooth_AdapterPowerMeasure', host=host, max_power_mw=3, 34 num_iterations=1) 35 36parallel_simple(run, machines) 37