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

Unified Diff: server/site_wifitest.py

Issue 1696006: Integrate with autotest log. (Closed)
Patch Set: Iterate 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_tests/network_WiFiSecMat/network_WiFiSecMat.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 49712bb8e6cb4dd872ab22bf234a5c885d0e3b98..0bf8512492c98f09baafc6ecad06b02abd9b7924 100644
--- a/server/site_wifitest.py
+++ b/server/site_wifitest.py
@@ -66,8 +66,8 @@ class WiFiTest(object):
def __init__(self, name, steps, config):
self.name = name
self.steps = steps
- router = config['router']
+ router = config['router']
self.router = hosts.create_host(router['addr'])
# NB: truncate SSID to 32 characters
self.defssid = self.__get_defssid(router['addr'])[0:32]
@@ -79,7 +79,7 @@ class WiFiTest(object):
elif site_bsd_router.isBSDRouter(self.router):
router['type'] = 'bsd'
else:
- raise Exception('Unable to autodetect router type')
+ raise error.TestFail('Unable to autodetect router type')
if router['type'] == 'linux':
self.wifi = site_linux_router.LinuxRouter(self.router, router,
self.defssid)
@@ -87,7 +87,7 @@ class WiFiTest(object):
self.wifi = site_bsd_router.BSDRouter(self.router, router,
self.defssid)
else:
- raise Exception('Unsupported router')
+ raise error.TestFail('Unsupported router')
#
# The client machine must be reachable from the control machine.
@@ -161,6 +161,7 @@ class WiFiTest(object):
logging.error("%s: Step '%s' failed: %s; abort test",
self.name, method, str(e))
self.cleanup(params)
+ raise e
break
else:
logging.error("%s: Step '%s' unknown; abort test",
@@ -253,7 +254,7 @@ sys.exit(0)'''
result = host.run("ifconfig %s" % ifnet)
m = re.search('inet addr:([^ ]*)', result.stdout)
if m is None:
- raise Except, "No inet address found"
+ raise error.TestFail("No inet address found")
return m.group(1)
« no previous file with comments | « server/site_tests/network_WiFiSecMat/network_WiFiSecMat.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698