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

Unified Diff: server/site_wifitest.py

Issue 1517016: Updated wifi tests to work with an OpenWrt router. (Closed)
Patch Set: Rev2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « server/site_linux_router.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/site_wifitest.py
diff --git a/server/site_wifitest.py b/server/site_wifitest.py
index 7220523c2f4f656293c1997a4df6cf969a3d1550..dfa60a8b67ac884d5014f857dea294f823b16679 100644
--- a/server/site_wifitest.py
+++ b/server/site_wifitest.py
@@ -6,7 +6,7 @@ import common, fnmatch, logging, os, re, string, threading, time
from autotest_lib.server import autotest, subcommand
from autotest_lib.server import site_bsd_router
-#from autotest_lib.server import site_linux_router
+from autotest_lib.server import site_linux_router
class NotImplemented(Exception):
def __init__(self, what):
@@ -94,8 +94,14 @@ class WiFiTest(object):
# interface name on client
self.wlanif = "wlan0"
- # XXX auto-detect router type
- self.wifi = site_bsd_router.BSDRouter(self.router, router, self.defssid)
+ # auto-detect router type
+ router_uname = self.router.run('uname').stdout
+ if re.search('Linux', router_uname):
+ self.wifi = site_linux_router.LinuxRouter(self.router, router, self.defssid)
+ elif re.search('BSD', router_uname):
+ self.wifi = site_bsd_router.BSDRouter(self.router, router, self.defssid)
+ else:
+ raise Exception('Unsupported router')
# potential bg thread for ping untilstop
self.ping_thread = None
« no previous file with comments | « server/site_linux_router.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698