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