OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 AUTHOR = "Sam Leffler <sleffler@google.com>" | 5 AUTHOR = "Sam Leffler <sleffler@google.com>" |
6 TIME = "LONG" | 6 TIME = "LONG" |
7 NAME = "WiFi SecMat" | 7 NAME = "WiFi SecMat" |
8 TEST_CATEGORY = "Stress" | 8 TEST_CATEGORY = "Stress" |
9 TEST_CLASS = "network" | 9 TEST_CLASS = "network" |
10 TEST_TYPE = "Server" | 10 TEST_TYPE = "Server" |
11 SYNC_COUNT = 1 | 11 SYNC_COUNT = 1 |
12 DOC = """ | 12 DOC = """ |
13 WiFiMatFunc is a suite of 3-machine tests to validate basic WiFi functionality. | 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 | 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 | 15 (either off-the-shelf with a network-accesible CLI or a Linux/BSD system |
16 with a WiFi card that supports HostAP functionality). | 16 with a WiFi card that supports HostAP functionality). |
17 | 17 |
18 Configuration information to run_test: | 18 Configuration information to run_test: |
19 | 19 |
20 server - the IP address of the server (automatically filled in) | 20 server - the IP address of the server (automatically filled in) |
21 client - the IP address of the client (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 | 22 router - the IP address of the WiFi AP/Router and the names of the |
23 » » » wifi and wired devices to configure | 23 wifi and wired devices to configure |
24 """ | 24 """ |
25 | 25 |
26 from autotest_lib.server import site_wifitest | 26 from autotest_lib.server import site_wifitest |
27 | 27 |
28 import os | 28 site_wifitest.run_test_dir("network_WiFiSecMat", job, args, machines) |
29 | 29 |
30 # convert autoserv args to something usable | |
31 opts = dict([[k, v] for (k, e, v) in [x.partition('=') for x in args]]) | |
32 | |
33 config_file = opts.get('config_file', 'wifi_testbed_config') | |
34 test_pat = opts.get('test_pat', '[0-9]*') | |
35 router_addr = opts.get('router_addr', None) | |
36 server_addr = opts.get('server_addr', None) | |
37 | |
38 config = site_wifitest.read_wifi_testbed_config( | |
39 os.path.join(job.configdir, config_file), | |
40 client_addr = machines[0], # NB: take client identity from command line | |
41 router_addr = router_addr, | |
42 server_addr = server_addr) | |
43 | |
44 server = config['server'] | |
45 router = config['router'] | |
46 | |
47 logging.info("Client %s, Server %s, AP %s" % \ | |
48 (machines[0], server.get('addr', 'N/A'), router['addr'])) | |
49 | |
50 dir = os.path.join(job.serverdir, "site_tests", "network_WiFiSecMat") | |
51 | |
52 for t in site_wifitest.read_tests(dir, test_pat): | |
53 job.run_test("network_WiFiSecMat", testcase=t, config=config, tag=t['file']) | |
OLD | NEW |