Home | History | Annotate | Download | only in autotest_SyncCount
      1 # Copyright 2016 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 = 'lgoodby'
      6 NAME = 'autotest_SyncCount'
      7 SYNC_COUNT = 2
      8 TIME = 'MEDIUM'
      9 TEST_TYPE = 'Server'
     10 ATTRIBUTES = 'suite:push_to_prod, suite:bvt-perbuild'
     11 
     12 DOC = """
     13 Tests that SYNC_COUNT schedules 2 hosts.
     14 """
     15 
     16 from autotest_lib.server import utils as server_utils
     17 from autotest_lib.server import site_utils
     18 
     19 
     20 def run(ntuple):
     21   job.run_test('autotest_SyncCount', ntuple=ntuple)
     22 
     23 ntuples, failures = server_utils.form_ntuples_from_machines(
     24     machines, SYNC_COUNT)
     25 
     26 for machine, failure in failures:
     27   hostname = site_utils.get_hostname_from_machine(machine)
     28   job.record('FAIL', None, '%s:%s' % (hostname, failure))
     29 
     30 # Use log=False in parallel_simple to avoid an exception in setting up
     31 # the incremental parser when SYNC_COUNT > 1.
     32 
     33 job.parallel_simple(run, ntuples, log=False)
     34