Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: server/site_tests/network_WiFiMatFunc/control

Issue 1512032: WiFi test cleanups (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 MatFunc" 7 NAME = "WiFi MatFunc"
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 = 2 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 import os
29 29
30 fd = open(os.path.join(job.configdir, "wifi_testbed_config")) 30 config = site_wifitest.read_wifi_testbed_config(
31 config = eval(fd.read()) 31 os.path.join(job.configdir, "wifi_testbed_config"),
32 client = config['client'] 32 client_addr = machines[0]) # NB: take client identity from command line
33 client['addr'] = machines[0] # NB: take client identity from command line 33
34 client['host'] = hosts.create_host(client['addr'])
35 server = config['server'] 34 server = config['server']
36 if 'addr' in server:
37 server['host'] = hosts.create_host(server['addr'])
38 router = config['router'] 35 router = config['router']
39 router['host'] = hosts.create_host(router['addr'])
40 36
41 logging.info("Client %s, Server %s, AP %s" % \ 37 logging.info("Client %s, Server %s, AP %s" % \
42 (client['addr'], getattr(server, 'addr', 'N/A'), router['addr'])) 38 (machines[0], server.get('addr', 'N/A'), router['addr']))
43 39
44 tagname = router['addr'] 40 tagname = config['tagname']
45 41
46 dir = os.path.join(job.serverdir, "site_tests", "network_WiFiMatFunc") 42 dir = os.path.join(job.serverdir, "site_tests", "network_WiFiMatFunc")
47 # TODO(sleffler) allow test list override from command line 43 # TODO(sleffler) allow test list override from command line
48 tests = site_wifitest.read_tests(dir, '[0-9]*') 44 tests = site_wifitest.read_tests(dir, '[0-9]*')
49 45
50 for t in tests: 46 for t in tests:
51 wt = site_wifitest.WiFiTest(t['name'], t['steps'], router, client, server) 47 wt = site_wifitest.WiFiTest(t['name'], t['steps'], config)
52 wt.run() 48 wt.run()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698