aboutsummaryrefslogtreecommitdiff
path: root/server/site_tests/firmware_Cr50DeepSleepStress/control.reboot
blob: 7306d72023f1428f2b534b6b50977afed6db7e41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 2017 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 = "mruthven"
NAME = "firmware_Cr50DeepSleepStress.reboot"
PURPOSE = "Verify deep sleep"
ATTRIBUTES = "suite:faft_cr50_pvt, suite:faft_cr50_prepvt"
TIME = "LONG"
TEST_TYPE = "server"
DEPENDENCIES = "servo_state:WORKING"

DOC = """
Cr50 should enter deep sleep every time the system goes into S5. Run
power_SuspendStress and verify the deep sleep count matches the number of
suspend iterations.
"""

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)

    basic = args_dict.get("basic", "").lower() == "true"
    default_count = 10 if basic else 100
    suspend_count = int(args_dict.get("suspend_count", default_count))
    reset_type = args_dict.get("reset_type", "reboot")

    job.run_test("firmware_Cr50DeepSleepStress", host=host, cmdline_args=args,
                 suspend_count=suspend_count, reset_type=reset_type)

parallel_simple(run, machines)