# Copyright 2016 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 = "Intel"
NAME = "platform_S3Cycle.1000"
PURPOSE = "Servo based S3 state transition test."
ATTRIBUTES = "suite:kernel_daily_regression"
DEPENDENCIES = "servo"
TIME = "LONG"
TEST_CATEGORY = "Stress"
TEST_CLASS = "platform"
TEST_TYPE = "server"
JOB_RETRIES = 2

DOC = """
This test check S3 state transitions.
"""

args_dict = utils.args_to_dict(args)
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
args.append('faft_iterations=1000')

def run_s3cycle(machine):
    host = hosts.create_host(machine, servo_args=servo_args)
    job.run_test("platform_S3Cycle", host=host, cmdline_args=args,
                 disable_sysinfo=True)

parallel_simple(run_s3cycle, machines)