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_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'
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)
29
30def run(machine):
31    host = hosts.create_host(machine)
32    job.run_test('bluetooth_AdapterPowerMeasure', host=host, max_power_mw=4,
33                 num_iterations=100, args_dict=args_dict)
34
35parallel_simple(run, machines)
36