Home | History | Annotate | Download | only in power_Standby
      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 import re
      5 
      6 AUTHOR = "Chrome OS Team"
      7 NAME = "power_Standby"
      8 TIME = "LONG"
      9 TEST_CATEGORY = "Benchmark"
     10 TEST_CLASS = "power"
     11 TEST_TYPE = "client"
     12 
     13 DOC = """
     14 This test measures the power draw during standby (S3).
     15 
     16 Test 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 
     22 Arguments:
     23   sample_hours: float, number of hours between charge use samples.
     24   test_hours: float, the number of hours to run the test.
     25 
     26 Test 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 
     33 SAMPLE_HOURS = 1.0
     34 TEST_HOURS = 12.0
     35 max_milliwatts_standby = 500.0
     36 
     37 args_dict = utils.args_to_dict(args)
     38 
     39 sample_hours = float(args_dict.get('sample_hours', SAMPLE_HOURS))
     40 test_hours = float(args_dict.get('test_hours', TEST_HOURS))
     41 pdash_note = args_dict.get('pdash_note', '')
     42 
     43 job.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