Home | History | Annotate | Download | only in power_BatteryChargeControl
      1 # Copyright 2018 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 
      5 from autotest_lib.server import utils
      6 
      7 AUTHOR = "Chrome OS Team"
      8 NAME = "power_BatteryChargeControl.charge70"
      9 PURPOSE = "Use Servo v4 to charge the DUT"
     10 CRITERIA = ""
     11 TIME = "LONG"
     12 TEST_CATEGORY = "Functional"
     13 TEST_CLASS = "power"
     14 TEST_TYPE = "server"
     15 DEPENDENCIES = "servo"
     16 
     17 DOC = """
     18 Use Servo v4 to charge the DUT to 70% battery capacity.
     19 DUT is connected to Servo v4 via USB type-C, and Servo v4 is connected to AC
     20 power.
     21 
     22 Sample usage:
     23 test_that <ip address of DUT> power_BatteryChargeControl.charge70 \
     24 --args 'servo_host=localhost servo_port=9999'
     25 """
     26 
     27 args_dict = utils.args_to_dict(args)
     28 servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
     29 
     30 def run(machine):
     31     host = hosts.create_host(machine, servo_args=servo_args)
     32     job.run_test("power_BatteryChargeControl",
     33                  tag=NAME.split('.')[1],
     34                  host=host,
     35                  percent_charge_to_add=None,
     36                  percent_target_charge=70)
     37 
     38 parallel_simple(run, machines)
     39