Home | History | Annotate | Download | only in network_WiFi_ReconnectInDarkResume
      1 # Copyright 2015 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 from autotest_lib.server import utils
      6 
      7 AUTHOR = 'samueltan, ejcaruso'
      8 NAME = 'network_WiFi_ReconnectInDarkResume.DisconnectAfterSuspendSameAP'
      9 TIME = 'SHORT'
     10 TEST_TYPE = 'Server'
     11 DEPENDENCIES = 'wificell, servo, lucidsleep'
     12 ATTRIBUTES = 'suite:wifi_correctness_cros_core, suite:wifi_lucidsleep'
     13 
     14 DOC = """
     15 This test verifies that the DUT that suspends connected, then subsequently
     16 disconnects while suspended, successfully reconnects to a preferred network
     17 that later appears while it is still suspended. In this test, the preferred
     18 network that appears during suspend is the same network that the DUT was last
     19 connected to before suspend.
     20 
     21 The test is conducted as follows:
     22 
     23 1) AP ("AP 1") is brought up, and DUT connects to it
     24 2) AP 1 is brought down, disconnecting the DUT from it
     25 3) Another AP ("AP 2") is brought up, and DUT connects to it
     26 4) DUT suspends while connected to AP 2
     27 5) AP 2 is brought down, disconnecting the DUT from it while suspended
     28 6) AP 2 is brought up again
     29 7) The DUT is woken from suspend
     30 8) Verify that the DUT is connected to AP 2 upon resuming from suspend
     31 
     32 We verify the connectivity status of the DUT on resume by parsing shill logs,
     33 since the delays involved in waking a DUT from suspend using autotest framework
     34 make real-time checks inaccurate.
     35 """
     36 
     37 args_dict = utils.args_to_dict(args)
     38 servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
     39 
     40 def run(machine):
     41     host = hosts.create_host(machine, servo_args=servo_args)
     42     job.run_test('network_WiFi_ReconnectInDarkResume',
     43                  host=host,
     44                  tag=NAME.split('.')[1],
     45                  disconnect_before_suspend=False,
     46                  reconnect_to_same_ap=True,
     47                  num_iterations=1,
     48                  raw_cmdline_args=args)
     49 
     50 parallel_simple(run, machines)
     51