• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.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'
20PY_VERSION = 3
21
22DOC = """
23This test case verifies that the Bluetooth chip of the DUT does
24not consume power more than specified during system suspension.
25
26This autotest include the following test cases:
27     self.test_case_suspend_power_measurement()
28"""
29
30args_dict = utils.args_to_dict(args)
31
32def run(machine):
33    host = hosts.create_host(machine)
34    job.run_test('bluetooth_AdapterPowerMeasure', host=host,
35                 num_iterations=1, args_dict=args_dict,
36                 test_name=NAME.split('.')[1], max_power_mw=4)
37
38parallel_simple(run, machines)
39