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 = 'ChromeOS Team' 10NAME = 'bluetooth_AdapterPowerMeasure.suspension_100' 11PURPOSE = 'Test power consumption of Bluetooth chip during system suspension.' 12CRITERIA = 'Bluetooth chip should consume power less than specified.' 13ATTRIBUTES = '' 14TIME = 'LONG' # Takes about 60 mins 15TEST_CATEGORY = 'Functional' 16TEST_CLASS = 'bluetooth' 17TEST_TYPE = 'server' 18DEPENDENCIES = 'bluetooth, working_bluetooth_btpeer:1, servo' 19PY_VERSION = 3 20 21DOC = """ 22This test case verifies that the Bluetooth chip of the DUT does 23not consume power more than specified during system suspension. 24 25This autotest include the following test cases: 26 self.test_case_suspend_power_measurement() 27""" 28 29args_dict = utils.args_to_dict(args) 30 31def run(machine): 32 host = hosts.create_host(machine) 33 job.run_test('bluetooth_AdapterPowerMeasure', host=host, max_power_mw=4, 34 num_iterations=100, args_dict=args_dict) 35 36parallel_simple(run, machines) 37