Home | History | Annotate | Download | only in network_WiFi_SuspendStress
      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 
      5 AUTHOR = 'krisr, tienchang, bmahadev'
      6 NAME = 'network_WiFi_SuspendStress.stress_WPA2'
      7 TIME = 'LONG'
      8 TEST_TYPE = 'Server'
      9 DEPENDENCIES = 'wificell'
     10 ATTRIBUTES = 'suite:wifi_stress'
     11 
     12 DOC = """
     13 This test uses powerd_dbus to suspend and resume and checks that the
     14 wifi adapter is brought back up and connects to a WPA2 network.
     15 """
     16 
     17 from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes
     18 from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes
     19 from autotest_lib.client.common_lib.cros.network import xmlrpc_security_types
     20 from autotest_lib.server.cros.network import hostap_config
     21 
     22 def run(machine):
     23     host = hosts.create_host(machine)
     24     wpa_config = xmlrpc_security_types.WPAConfig(
     25             psk='chromeos',
     26             wpa_mode=xmlrpc_security_types.WPAConfig.MODE_PURE_WPA2,
     27             wpa2_ciphers=[xmlrpc_security_types.WPAConfig.CIPHER_CCMP])
     28     ap_config = hostap_config.HostapConfig(
     29             frequency=2412,
     30             mode=hostap_config.HostapConfig.MODE_11N_PURE,
     31             security_config=wpa_config)
     32     assoc_params = xmlrpc_datatypes.AssociationParameters()
     33     assoc_params.security_config = wpa_config
     34     configurations = [(ap_config, assoc_params)]
     35     job.run_test('network_WiFi_SuspendStress',
     36                  host=host,
     37                  tag=NAME.split('.')[1],
     38                  suspends=690,
     39                  raw_cmdline_args=args,
     40                  additional_params=configurations)
     41 
     42 parallel_simple(run, machines)
     43