• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2018 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
5AUTHOR = "dhaddock, Chromium OS"
6NAME = "autoupdate_P2P.too_many_attempts.delta"
7PURPOSE = "Test autoupdate via peer to peer(P2P)."
8TIME = "MEDIUM"
9TEST_CATEGORY = "Functional"
10TEST_CLASS = "platform"
11TEST_TYPE = "server"
12ATTRIBUTES = "suite:au-perbuild"
13SYNC_COUNT = 2
14DOC = """
15This tests autoupdate between two devices via peer to peer is disabled when
16they have tried more than 10 times.
17
18"""
19
20from autotest_lib.server import utils as server_utils
21
22def run(ntuple):
23    host_list = []
24    for machine in ntuple:
25        host_list.append(hosts.create_host(machine))
26    job.run_test('autoupdate_P2P', hosts=host_list, too_many_attempts=True)
27
28ntuples, failures = server_utils.form_ntuples_from_machines(machines,
29                                                            SYNC_COUNT)
30
31# Use log=False in parallel_simple to avoid an exception in setting up
32# the incremental parser when SYNC_COUNT > 1.
33job.parallel_simple(run, ntuples, log=False)
34