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.pw_measurement_suspension_test'
11PURPOSE = 'Test power consumption of Bluetooth chip during system suspension.'
12CRITERIA = 'Bluetooth chip should consume power less than specified.'
13# Remove this test from the lab before it is fixed.
14ATTRIBUTES = ''
15TIME = 'SHORT'   # Takes about 2 mins
16TEST_CATEGORY = 'Functional'
17TEST_CLASS = 'bluetooth'
18TEST_TYPE = 'server'
19DEPENDENCIES = 'bluetooth, working_bluetooth_btpeer:1, servo'
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,
34                 num_iterations=1, args_dict=args_dict,
35                 test_name=NAME.split('.')[1], max_power_mw=4)
36
37parallel_simple(run, machines)
38