1# Copyright 2018 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 = 'harpreet'
6NAME = 'network_WiFi_ChaosConnectDisconnect.static_5Ghz'
7TIME = 'LONG'
8TEST_TYPE = 'server'
9ATTRIBUTES = 'suite:wifi_interop'
10DEPENDENCIES = 'chaos_dut'
11MAX_RESULT_SIZE_KB = 512000
12
13DOC = """
14This script iterates through all 5Ghz access points in Chaos chamber.
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 5Ghz static APs on channel 36, 40, 44, 48, 149, 153, 157 and 161
23    ap_specs = [ap_spec.APSpec(band=ap_spec.BAND_5GHZ,
24                               channel = 36,
25                               configurator_type=ap_spec.CONFIGURATOR_STATIC),
26                ap_spec.APSpec(band=ap_spec.BAND_5GHZ,
27                               channel = 40,
28                               configurator_type=ap_spec.CONFIGURATOR_STATIC),
29                ap_spec.APSpec(band=ap_spec.BAND_5GHZ,
30                               channel = 44,
31                               configurator_type=ap_spec.CONFIGURATOR_STATIC),
32                ap_spec.APSpec(band=ap_spec.BAND_5GHZ,
33                               channel = 48,
34                               configurator_type=ap_spec.CONFIGURATOR_STATIC),
35                ap_spec.APSpec(band=ap_spec.BAND_5GHZ,
36                               channel = 149,
37                               configurator_type=ap_spec.CONFIGURATOR_STATIC),
38                ap_spec.APSpec(band=ap_spec.BAND_5GHZ,
39                               channel = 153,
40                               configurator_type=ap_spec.CONFIGURATOR_STATIC),
41                ap_spec.APSpec(band=ap_spec.BAND_5GHZ,
42                               channel = 157,
43                               configurator_type=ap_spec.CONFIGURATOR_STATIC),
44                ap_spec.APSpec(band=ap_spec.BAND_5GHZ,
45                               channel = 161,
46                               configurator_type=ap_spec.CONFIGURATOR_STATIC)]
47
48    for spec in ap_specs:
49        runner = static_runner.StaticRunner(
50                'network_WiFi_ChaosConnectDisconnect', host, spec)
51        runner.run(job)
52
53parallel_simple(run_chaos_static, machines)
54