Home | History | Annotate | Download | only in dummy_PassServer
      1 # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 AUTHOR = "Chrome OS Team"
      6 NAME = "dummy_PassServer"
      7 PURPOSE = "Demonstrate success methods of autotests."
      8 CRITERIA = "This test will always succeed."
      9 ATTRIBUTES = "suite:dummy_server"
     10 TIME = "SHORT"
     11 TEST_CATEGORY = "General"
     12 TEST_CLASS = "dummy"
     13 TEST_TYPE = "server"
     14 
     15 DOC = """
     16 This is a helper test that will succeed.
     17 """
     18 
     19 from autotest_lib.client.common_lib import utils
     20 
     21 try:
     22     from chromite.lib import metrics
     23 except ImportError:
     24     metrics = utils.metrics_mock
     25 
     26 
     27 def run(machine):
     28     job.run_test('dummy_PassServer',
     29                  host=hosts.create_host(machine))
     30 
     31 m = 'chromeos/autotest/infra_benchmark/dummy_pass_server/duration'
     32 with metrics.SecondsTimer(m, fields={'success': False}) as c:
     33     parallel_simple(run, machines)
     34     c['success'] = True
     35