# Copyright (c) 2013 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.

AUTHOR = "Chrome OS Team"
NAME = "dummy_PassServer"
PURPOSE = "Demonstrate success methods of autotests."
CRITERIA = "This test will always succeed."
ATTRIBUTES = "suite:dummy_server"
TIME = "SHORT"
TEST_CATEGORY = "General"
TEST_CLASS = "dummy"
TEST_TYPE = "server"
MAX_RESULT_SIZE_KB = 6000

DOC = """
This is a helper test that will succeed.
"""

from autotest_lib.client.common_lib import utils

try:
    from chromite.lib import metrics
except ImportError:
    metrics = utils.metrics_mock


def run(machine):
    job.run_test('dummy_PassServer',
                 host=hosts.create_host(machine))

m = 'chromeos/autotest/infra_benchmark/dummy_pass_server/duration'
with metrics.SecondsTimer(m, fields={'success': False}) as c:
    parallel_simple(run, machines)
    c['success'] = True