| # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| AUTHOR = "Sam Leffler <sleffler@google.com>" |
| TIME = "LONG" |
| NAME = "WiFi MatFunc" |
| TEST_CATEGORY = "Stress" |
| TEST_CLASS = "network" |
| TEST_TYPE = "Server" |
| SYNC_COUNT = 1 |
| DOC = """ |
| WiFiMatFunc is a suite of 3-machine tests to validate basic WiFi functionality. |
| One client, one server, and one programmable WiFi AP/Router are required |
| (either off-the-shelf with a network-accesible CLI or a Linux/BSD system |
| with a WiFi card that supports HostAP functionality). |
| |
| Configuration information to run_test: |
| |
| server - the IP address of the server (automatically filled in) |
| client - the IP address of the client (automatically filled in) |
| router - the IP address of the WiFi AP/Router and the names of the |
| wifi and wired devices to configure |
| """ |
| |
| from autotest_lib.server import site_wifitest |
| |
| import os |
| |
| config = site_wifitest.read_wifi_testbed_config( |
| os.path.join(job.configdir, "wifi_testbed_config"), |
| client_addr = machines[0]) # NB: take client identity from command line |
| |
| server = config['server'] |
| router = config['router'] |
| |
| logging.info("Client %s, Server %s, AP %s" % \ |
| (machines[0], server.get('addr', 'N/A'), router['addr'])) |
| |
| tagname = config['tagname'] |
| |
| dir = os.path.join(job.serverdir, "site_tests", "network_WiFiMatFunc") |
| # TODO(sleffler) allow test list override from command line |
| tests = site_wifitest.read_tests(dir, '[0-9]*') |
| |
| for t in tests: |
| wt = site_wifitest.WiFiTest(t['name'], t['steps'], config) |
| wt.run() |