Home | History | Annotate | Download | only in network_WiFi_CliqueLongConnect
      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 
      5 AUTHOR = 'rpius'
      6 NAME = 'network_WiFi_CliqueLongConnect.debug'
      7 TIME = 'SHORT'
      8 TEST_TYPE = 'server'
      9 
     10 DOC = """
     11 This test makes 2 sets of DUTs repeatedly (2 runs) connect and maintain the
     12 connection alive for 30 seconds simultaneously to 2 different APs.
     13 """
     14 
     15 from autotest_lib.server.cros.ap_configurators import ap_spec
     16 from autotest_lib.server.cros.clique_lib import clique_dut_locker
     17 from autotest_lib.server.cros.clique_lib import clique_runner
     18 
     19 def 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     # Let's accquire 2 random connection worker devices.
     44     conn_worker_hostnames = [None, None]
     45 
     46     runner = clique_runner.CliqueRunner(
     47             'network_WiFi_CliqueLongConnect', dut_pool_spec, ap_specs)
     48     runner.run(job, tries=2, conn_worker_hostnames=conn_worker_hostnames)
     49 
     50 
     51 parallel_simple(run_clique_debug, machines)
     52