• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 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 = 'rpius'
6NAME = 'network_WiFi_CliqueConnectDisconnect.debug'
7TIME = 'SHORT'
8TEST_TYPE = 'server'
9
10DOC = """
11This test makes 2 sets of DUTs repeatedly (2 runs) connect/disconnect
12simultaneously to 2 APs.
13"""
14
15from autotest_lib.server.cros.ap_configurators import ap_spec
16from autotest_lib.server.cros.clique_lib import clique_dut_locker
17from autotest_lib.server.cros.clique_lib import clique_runner
18
19def run_clique_debug(machine):
20    host = hosts.create_host(machine)
21
22    # Test with these two APs
23    debug_aps = ['chromeos3-row2-rack1-host3', 'chromeos3-row2-rack1-host7']
24    ap_specs = [ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
25                               band=ap_spec.BAND_2GHZ,
26                               hostnames=debug_aps),
27                ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
28                               band=ap_spec.BAND_5GHZ,
29                               hostnames=debug_aps)]
30
31    # Test with 2 DUT's in a set
32    dut_pool_spec = clique_dut_locker.DUTPoolSpec()
33    dut_set_spec1 = clique_dut_locker.DUTSetSpec()
34    dut_set_spec2 = clique_dut_locker.DUTSetSpec()
35    dut_spec1 = clique_dut_locker.DUTSpec(
36            host_name='chromeos1-row1-rack3-host4.cros')
37    dut_spec2 = clique_dut_locker.DUTSpec(
38            host_name='chromeos1-row1-rack10-host2.cros')
39    dut_set_spec1.append(dut_spec1)
40    dut_set_spec2.append(dut_spec2)
41    dut_pool_spec.extend([dut_set_spec1, dut_set_spec2])
42
43    runner = clique_runner.CliqueRunner(
44            'network_WiFi_CliqueConnectDisconnect', dut_pool_spec, ap_specs)
45    runner.run(job, tries=2)
46
47
48parallel_simple(run_clique_debug, machines)
49