• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5from autotest_lib.server import utils
6
7AUTHOR = "Chrome OS Team"
8NAME = "power_BatteryChargeControl.charge70"
9PURPOSE = "Use Servo v4 to charge the DUT"
10CRITERIA = ""
11TIME = "LONG"
12TEST_CATEGORY = "Functional"
13TEST_CLASS = "power"
14TEST_TYPE = "server"
15DEPENDENCIES = "servo_state:WORKING"
16
17DOC = """
18Use Servo v4 to charge the DUT to 70% battery capacity.
19DUT is connected to Servo v4 via USB type-C, and Servo v4 is connected to AC
20power.
21
22Sample usage:
23test_that <ip address of DUT> power_BatteryChargeControl.charge70 \
24--args 'servo_host=localhost servo_port=9999'
25"""
26
27args_dict = utils.args_to_dict(args)
28servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
29
30def 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
38parallel_simple(run, machines)
39