• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.suspend'
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 performs a suspend resume cycle and check the liveliness of the
21connection to the AP.
22"""
23
24from autotest_lib.server.cros.ap_configurators import ap_spec
25from autotest_lib.server.cros.chaos_lib import chaos_runner
26from autotest_lib.server.cros.network import connection_worker
27
28def run_chaos_wpa2psk(machine):
29    host = hosts.create_host(machine)
30    # Test with WPA2PSK on both 2.4 and 5 GHz bands
31    ap_specs = [ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
32                               band=ap_spec.BAND_2GHZ),
33                ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
34                               band=ap_spec.BAND_5GHZ),
35                # Non-US models, which are all static
36                ap_spec.APSpec(security=ap_spec.SECURITY_TYPE_WPA2PSK,
37                               band=ap_spec.BAND_5GHZ,
38                               channel=48,
39                               configurator_type=ap_spec.CONFIGURATOR_STATIC)]
40    conn_worker = connection_worker.ConnectionSuspend(suspend_sec=30)
41    for spec in ap_specs:
42        runner = chaos_runner.ChaosRunner(
43                'network_WiFi_ChaosLongConnect', host, spec)
44        runner.run(job, conn_worker=conn_worker)
45
46
47parallel_simple(run_chaos_wpa2psk, machines)
48