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