blob: f20aeb70adcf2caaa95d4defa5d2127d1ec64159 [file] [log] [blame]
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
AUTHOR = "hbarnor, ChromiumOS"
NAME = "nbr_EndToEndTest.basic_wifi"
METADATA = {
"contacts": [
"chromeos-core-services@google.com",
],
"bug_component": "b:1341743",
"criteria": "Test an NBR N-to-M recovery with Nebraska over WiFi."
}
TIME = "MEDIUM"
TEST_TYPE = "server"
DEPENDENCIES = "servo_state:WORKING, wificell"
HW_DEPS = ['minios']
ATTRIBUTES = "suite:nbr-wifi"
DOC = """
This tests an N-to-M recovery. This means that it will recover from a ToT
install to the current stable. This test will be used in the CQ to ensure that
changes don't break NBR.
In the lab, a job_repo_url will be passed directly to the test. It contains
information about the build to use and the IP address of lab cache server to
download update payloads from. Local runs can use cache servers as well but
the setup is fairly complicated.
Instead you can use the `running_at_desk` arg when running tests locally to
avoid the extra setup needed to access cache servers from your workstation.
`running_at_desk` will copy payloads from gs://chromeos-image-archive/ to a
public bucket that is accessible without additional configuration.
Example usage:
test_that nbr_EndToEndTest.basic_wifi <DUT> --board=<board> --args="build=RXX-XXXXX.X.X"
"""
from autotest_lib.client.common_lib import utils
from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes
from autotest_lib.client.common_lib.cros.network import xmlrpc_security_types
from autotest_lib.server.cros.network import hostap_config
args_dict = utils.args_to_dict(args)
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
def run(machine):
wpa_config = xmlrpc_security_types.WPAConfig(
psk='nbr_minios',
wpa_mode=xmlrpc_security_types.WPAConfig.MODE_PURE_WPA2,
wpa2_ciphers=[xmlrpc_security_types.WPAConfig.CIPHER_CCMP])
ap_config = hostap_config.HostapConfig(
frequency=2412,
mode=hostap_config.HostapConfig.MODE_11G,
security_config=wpa_config)
assoc_params = xmlrpc_datatypes.AssociationParameters()
assoc_params.security_config = wpa_config
wifi_configs = [(ap_config, assoc_params)]
host = hosts.create_host(machine, servo_args=servo_args, **args_dict)
job.run_test("nbr_EndToEndTest", host=host, wifi_configs=wifi_configs,
n2m=False, **args_dict)
job.parallel_simple(run, machines)