OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2010 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 = "Sam Leffler <sleffler@google.com>" |
| 6 TIME = "LONG" |
| 7 NAME = "WiFi MatFunc" |
| 8 TEST_CATEGORY = "Stress" |
| 9 TEST_CLASS = "Network" |
| 10 TEST_TYPE = "Server" |
| 11 SYNC_COUNT = 2 |
| 12 DOC = """ |
| 13 WiFiMatFunc is a suite of 3-machine tests to validate basic WiFi functionality. |
| 14 One client, one server, and one programmable WiFi AP/Router are required |
| 15 (either off-the-shelf with a network-accesible CLI or a Linux/BSD system |
| 16 with a WiFi card that supports HostAP functionality). |
| 17 |
| 18 Configuration information to run_test: |
| 19 |
| 20 server - the IP address of the server (automatically filled in) |
| 21 client - the IP address of the client (automatically filled in) |
| 22 router - the IP address of the WiFi AP/Router and the names of the |
| 23 wifi and wired devices to configure |
| 24 """ |
| 25 |
| 26 from autotest_lib.server import site_wifitest |
| 27 |
| 28 import os |
| 29 |
| 30 fd = open(os.path.join(job.configdir, "wifi_testbed_config")) |
| 31 config = eval(fd.read()) |
| 32 client = config['client'] |
| 33 client['host'] = hosts.create_host(client['addr']) |
| 34 server = config['server'] |
| 35 server['host'] = hosts.create_host(server['addr']) |
| 36 router = config['router'] |
| 37 router['host'] = hosts.create_host(router['addr']) |
| 38 |
| 39 logging.info("Client %s, Server %s, AP %s" % \ |
| 40 (client['addr'], server['addr'], router['addr'])) |
| 41 |
| 42 tagname = router['addr'] |
| 43 |
| 44 dir = os.path.join(job.serverdir, "site_tests", "network_WiFiMatFunc") |
| 45 # XXX allow test list override from command line |
| 46 tests = site_wifitest.read_tests(dir, '[0-9]*') |
| 47 #tests = site_wifitest.read_tests(dir, '[0-9][012]*') |
| 48 #tests = site_wifitest.read_tests(dir, '00[56]*') |
| 49 |
| 50 for t in tests: |
| 51 wt = site_wifitest.WiFiTest(t['name'], t['steps'], router, client, server) |
| 52 wt.run() |
OLD | NEW |