1 # Copyright (c) 2013 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 = 'krisr, wiley, jabele' 6 NAME = 'network_WiFi_ChaosConnectDisconnect.local' 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. 14 """ 15 16 from autotest_lib.server.cros.ap_configurators import ap_spec 17 from autotest_lib.server.cros.chaos_lib import chaos_runner 18 19 def run_chaos_debug(machine): 20 host = hosts.create_host(machine) 21 # List of specific APs to debug. Please verify the APs indeed support PSK. 22 # Add your APs here. 23 debug_aps = ['chromeos3-row7-rack1-host2',] 24 # IP or DNS name of host to use as a packet capturing device. 25 capturer_hostname = 'chromeos3-row7-rack1-host1.cros' 26 ap_specs = [ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK, 27 hostnames=debug_aps, 28 band=ap_spec.BAND_2GHZ, 29 lab_ap=False)] 30 for spec in ap_specs: 31 runner = chaos_runner.ChaosRunner( 32 'network_WiFi_ChaosConnectDisconnect', host, spec) 33 runner.run(job, batch_size=2, tries=2, 34 capturer_hostname=capturer_hostname) 35 36 37 parallel_simple(run_chaos_debug, machines) 38