xref: /aosp_15_r20/external/autotest/client/site_tests/power_Standby/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright (c) 2012 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
5import re
6
7AUTHOR = "ChromeOS Team"
8NAME = "power_Standby"
9TIME = "LONG"
10TEST_CATEGORY = "Benchmark"
11TEST_CLASS = "power"
12TEST_TYPE = "client"
13PY_VERSION = 3
14
15DOC = """
16This test measures the power draw during standby (S3).
17
18Test uses RTC wake to transistion from S3 to S0 every sample_hours for a total
19  standby time of test_hours.  The S3->S0 transistions are added to
20  1. Validate battery use
21  2. Guarantee that S3 was maintained (no external/false wake)
22  3. Create S3->S0->S3 transistions which more closely model user's interaction.
23
24Arguments:
25  sample_hours: float, number of hours between charge use samples.
26  test_hours: float, the number of hours to run the test.
27
28Test must meet the following criteria:
29  Battery must contain ~20% of its charge.
30  Must be run on battery power
31  sample_hours > 0.1
32  test_hours > sample_hours
33"""
34
35SAMPLE_HOURS = 1.0
36TEST_HOURS = 12.0
37max_milliwatts_standby = 500.0
38
39args_dict = utils.args_to_dict(args)
40
41sample_hours = float(args_dict.get('sample_hours', SAMPLE_HOURS))
42test_hours = float(args_dict.get('test_hours', TEST_HOURS))
43pdash_note = args_dict.get('pdash_note', '')
44
45job.run_test('power_Standby', sample_hours=sample_hours, test_hours=test_hours,
46             max_milliwatts_standby=max_milliwatts_standby,
47             pdash_note=pdash_note)
48