blob: 83d740a637dfeae89dc421293114d5ab475ce9ff [file] [log] [blame]
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
AUTHOR = 'krisr, wiley, jabele'
NAME = 'network_WiFi_ChaosConnectDisconnect.wpa2psk'
TIME = 'LONG'
TEST_TYPE = 'server'
ATTRIBUTES = ('suite:wifi_interop, suite:android_wifi_interop, '
'suite:wifi_interop_wpa2')
DEPENDENCIES = 'chaos_nightly, chaos_dut'
DOC = """
This script iterates through all of the access points in the AP compatibility
lab and has a chrome device connect to each in series. This test must be
performed in the AP compatibility lab.
"""
from autotest_lib.server.cros.ap_configurators import ap_spec
from autotest_lib.server.cros.chaos_lib import chaos_runner
def run_chaos_wpa2psk(machine):
host = hosts.create_host(machine)
# Test with WPA2PSK on both 2.4 and 5 GHz bands
ap_specs = [ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
band=ap_spec.BAND_2GHZ),
ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
band=ap_spec.BAND_5GHZ),
# Non-US models, which are all static
ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
band=ap_spec.BAND_5GHZ,
channel=48,
configurator_type=ap_spec.CONFIGURATOR_STATIC)]
for spec in ap_specs:
runner = chaos_runner.ChaosRunner(
'network_WiFi_ChaosConnectDisconnect', host, spec)
runner.run(job)
parallel_simple(run_chaos_wpa2psk, machines)