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 5AUTHOR = 'asnagarajan, wiley, jabele' 6NAME = 'network_WiFi_ChaosLongConnect.debug' 7TIME = 'LONG' 8TEST_TYPE = 'server' 9 10DOC = """ 11This script iterates through all of the access points in the AP compatibility 12lab and has a chrome device connect to each in series. This test must be 13performed in the AP compatibility lab. This test would hold the connection with 14AP and performs some work during the connection. 15""" 16 17from autotest_lib.server.cros.ap_configurators import ap_spec 18from autotest_lib.server.cros.chaos_lib import chaos_runner 19from autotest_lib.server.cros.network import connection_worker 20 21def run_chaos_debug(machine): 22 host = hosts.create_host(machine) 23 # List of specific APs to debug. Please verify the APs indeed support PSK. 24 # Add your APs here. 25 debug_aps = ['chromeos3-row2-rack1-host3', 'chromeos3-row2-rack1-host7'] 26 # IP or DNS name of host to use as a packet capturing device. 27 # capturer_hostname = 'chromeos3-row1-rack1-host15.cros' 28 # IP or DNS name of host to use as a work client device. 29 # work_client_hostname = 'chromeos3-row1-rack1-host12.cros' 30 ap_specs = [ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK, 31 band=ap_spec.BAND_2GHZ, 32 hostnames=debug_aps), 33 ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK, 34 band=ap_spec.BAND_5GHZ, 35 hostnames=debug_aps)] 36 # Note that duration_sec of 10s is to make debuging faster. This is not 37 # going to capture re-keying events. See crbug.com/339222 38 conn_worker = connection_worker.ConnectionDuration(duration_sec=10) 39 for spec in ap_specs: 40 runner = chaos_runner.ChaosRunner( 41 'network_WiFi_ChaosLongConnect', host, spec) 42 runner.run(job, batch_size=2, conn_worker=conn_worker) 43 44 45parallel_simple(run_chaos_debug, machines) 46