You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
# Copyright 2018 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
from autotest_lib.server import utils
|
|
|
|
AUTHOR = "Chrome OS Team"
|
|
NAME = "power_BatteryChargeControl.charge70"
|
|
PURPOSE = "Use Servo v4 to charge the DUT"
|
|
CRITERIA = ""
|
|
TIME = "LONG"
|
|
TEST_CATEGORY = "Functional"
|
|
TEST_CLASS = "power"
|
|
TEST_TYPE = "server"
|
|
DEPENDENCIES = "servo_state:WORKING"
|
|
|
|
DOC = """
|
|
Use Servo v4 to charge the DUT to 70% battery capacity.
|
|
DUT is connected to Servo v4 via USB type-C, and Servo v4 is connected to AC
|
|
power.
|
|
|
|
Sample usage:
|
|
test_that <ip address of DUT> power_BatteryChargeControl.charge70 \
|
|
--args 'servo_host=localhost servo_port=9999'
|
|
"""
|
|
|
|
args_dict = utils.args_to_dict(args)
|
|
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
|
|
|
|
def run(machine):
|
|
host = hosts.create_host(machine, servo_args=servo_args)
|
|
job.run_test("power_BatteryChargeControl",
|
|
tag=NAME.split('.')[1],
|
|
host=host,
|
|
percent_charge_to_add=None,
|
|
percent_target_charge=70)
|
|
|
|
parallel_simple(run, machines)
|