| # Copyright 2017 The ChromiumOS Authors |
| # 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.faft_cr50_tot" |
| METADATA = { |
| "contacts": ["chromeos-faft@google.com", "mruthven@chromium.org"], |
| "bug_component": "b:792402", # ChromeOS > Platform > Enablement > Firmware > FAFT |
| "criteria": "Verify deep sleep", |
| } |
| # Disabled due to 0% pass rate over 30 days. See b/241833065 |
| # ATTRIBUTES = "suite:faft_cr50_tot" |
| TIME = "LONG" |
| TEST_TYPE = "server" |
| DEPENDENCIES = "servo_state:WORKING" |
| |
| DOC = """ |
| Cr50 should enter deep sleep every time the system goes into S3. Run |
| power_SuspendStress and verify the deep sleep count matches the number of |
| suspend iterations. |
| |
| This test is applicable when using ToT cr50 module. |
| TODO(crbug.com/1014572) Drop this control file once suites can inject test args. |
| """ |
| |
| args_dict = utils.args_to_dict(args) |
| servo_args = hosts.CrosHost.get_servo_arguments(args_dict) |
| |
| # crbug.com/1014572: Inject test args. |
| args_dict["tot_test_run"] = "true" |
| |
| |
| 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", "mem") |
| |
| job.run_test( |
| "firmware_Cr50DeepSleepStress", |
| host=host, |
| cmdline_args=args, |
| suspend_count=suspend_count, |
| reset_type=reset_type, |
| tag="faft_cr50_tot", |
| ) |
| |
| |
| parallel_simple(run, machines) |