harpreet | 2337061 | 2018-11-16 17:22:19 -0800 | [diff] [blame^] | 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 | |
| 5 | AUTHOR = 'harpreet' |
| 6 | NAME = 'network_WiFi_ChaosConnectDisconnect.static_2Ghz' |
| 7 | TIME = 'LONG' |
| 8 | TEST_TYPE = 'server' |
| 9 | ATTRIBUTES = 'suite:wifi_interop' |
| 10 | DEPENDENCIES = 'chaos_dut' |
| 11 | |
| 12 | DOC = """ |
| 13 | This script iterates through all 2Ghz access points in Chaos chamber. |
| 14 | """ |
| 15 | |
| 16 | from autotest_lib.server.cros.ap_configurators import ap_spec |
| 17 | from autotest_lib.server.cros.chaos_lib import static_runner |
| 18 | |
| 19 | def run_chaos_static(machine): |
| 20 | host = hosts.create_host(machine) |
| 21 | # Test all 2Ghz static APs on channel 1, 6 and 11 |
| 22 | ap_specs = [ap_spec.APSpec(band=ap_spec.BAND_2GHZ, |
| 23 | channel = 1, |
| 24 | configurator_type=ap_spec.CONFIGURATOR_STATIC), |
| 25 | ap_spec.APSpec(band=ap_spec.BAND_2GHZ, |
| 26 | channel = 6, |
| 27 | configurator_type=ap_spec.CONFIGURATOR_STATIC), |
| 28 | ap_spec.APSpec(band=ap_spec.BAND_2GHZ, |
| 29 | channel = 11, |
| 30 | configurator_type=ap_spec.CONFIGURATOR_STATIC)] |
| 31 | |
| 32 | for spec in ap_specs: |
| 33 | runner = static_runner.StaticRunner( |
| 34 | 'network_WiFi_ChaosConnectDisconnect', host, spec) |
| 35 | runner.run(job) |
| 36 | |
| 37 | parallel_simple(run_chaos_static, machines) |