Home | History | Annotate | Download | only in network_WiFi_ChaosLongConnect
      1 # Copyright (c) 2014 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 = 'asnagarajan, wiley, jabele'
      6 NAME = 'network_WiFi_ChaosLongConnect.long'
      7 TIME = 'LONG'
      8 TEST_TYPE = 'server'
      9 
     10 DOC = """
     11 This script iterates through all of the access points in the AP compatibility
     12 lab and has a chrome device connect to each in series. This test must be
     13 performed in the AP compatibility lab. This test would hold the connection with
     14 AP and performs some work during the connection.
     15 """
     16 
     17 from autotest_lib.server.cros.ap_configurators import ap_spec
     18 from autotest_lib.server.cros.chaos_lib import chaos_runner
     19 from autotest_lib.server.cros.network import connection_worker
     20 
     21 def run_chaos_wpa2psk(machine):
     22     host = hosts.create_host(machine)
     23     # Test with WPA2PSK on both 2.4 and 5 GHz bands
     24     ap_specs = [ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
     25                                band=ap_spec.BAND_2GHZ),
     26                 ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
     27                                band=ap_spec.BAND_5GHZ),
     28                 # Non-US models, which are all static
     29                 ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
     30                                band=ap_spec.BAND_5GHZ,
     31                                channel=48,
     32                                configurator_type=ap_spec.CONFIGURATOR_STATIC)]
     33     # Note that duration_sec of 30s would just hold the connection to the AP.
     34     # This is not going to capture re-keying events. See crbug.com/339222
     35     conn_worker = connection_worker.ConnectionDuration(duration_sec=30)
     36     for spec in ap_specs:
     37         runner = chaos_runner.ChaosRunner(
     38                 'network_WiFi_ChaosLongConnect', host, spec)
     39         runner.run(job, conn_worker=conn_worker)
     40 
     41 
     42 parallel_simple(run_chaos_wpa2psk, machines)
     43