1# Copyright 2016 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 = 'tienchang' 6NAME = 'network_WiFi_ChaosConnectDisconnect.static' 7TIME = 'LONG' 8TEST_TYPE = 'server' 9ATTRIBUTES = 'suite:wifi_interop_static' 10DEPENDENCIES = 'casey_dut' 11 12DOC = """ 13This script iterates through all of the access points configured as static, both 14open and wpa2psk. This test will run in Casey labs. 15""" 16 17from autotest_lib.server.cros.ap_configurators import ap_spec 18from autotest_lib.server.cros.chaos_lib import static_runner 19 20def run_chaos_static(machine): 21 host = hosts.create_host(machine) 22 # Test all static APs 23 ap_specs = [ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_DISABLED, 24 band=ap_spec.BAND_2GHZ, 25 configurator_type=ap_spec.CONFIGURATOR_STATIC), 26 ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_DISABLED, 27 band=ap_spec.BAND_5GHZ, 28 configurator_type=ap_spec.CONFIGURATOR_STATIC), 29 ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK, 30 band=ap_spec.BAND_2GHZ, 31 configurator_type=ap_spec.CONFIGURATOR_STATIC), 32 ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK, 33 band=ap_spec.BAND_5GHZ, 34 configurator_type=ap_spec.CONFIGURATOR_STATIC)] 35 36 for spec in ap_specs: 37 runner = static_runner.StaticRunner( 38 'network_WiFi_ChaosConnectDisconnect', host, spec) 39 runner.run(job) 40 41parallel_simple(run_chaos_static, machines) 42