# 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 = "dtosic@google.com, chromeos-meetings@google.com"
NAME = "enterprise_CFM_AutotestSmokeTest"
PURPOSE = ("Server-side smoke test used for tracking the stability of the "
           "Autotest framework on CFM platforms.")
CRITERIA = "Fails if the Autotest framework doesn't work as expected."
ATTRIBUTES = ("suite:hotrod, suite:bluestreak, suite:bluestreak-release, "
              "suite:bluestreak-perbuild, suite:bluestreak-pre-cq")
TIME = "SHORT"
TEST_CATEGORY = "Functional"
TEST_TYPE = "server"
BUG_TEMPLATE = {
    "labels": ["OS-Chrome"],
}

DOC = """
This test tracks the stability of the Auotest framework for server tests.
The test opens a web browser, loads 'chrome://version' and verifies that nothing
crashes.
"""

args_dict = utils.args_to_dict(args)
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)

def run_test(machine):
    host = hosts.create_host(machine, servo_args=servo_args)
    job.run_test('enterprise_CFM_AutotestSmokeTest', host=host)


parallel_simple(run_test, machines)