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

Unified Diff: server/site_wifitest.py

Issue 1763012: more WiFi testing fixes (Closed)
Patch Set: use rstrip to chop \n's 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 9892048393d6dbd5ba220e108e6e08389a9c98e4..388c53993680c26c4f09bb42cf05d5bb3651095e 100644
--- a/server/site_wifitest.py
+++ b/server/site_wifitest.py
@@ -264,7 +264,7 @@ sys.exit(0)'''
params['ssid'] = self.defssid
script = self.__get_connect_script(params)
result = self.client.run("python<<'EOF'\n%s\nEOF\n" % script)
- print "%s: %s" % (self.name, result.stdout[0:-1])
+ print "%s: %s" % (self.name, result.stdout.rstrip())
# fetch IP address of wireless device
self.client_wifi_ip = self.__get_ipaddr(self.client, self.client_wlanif)
@@ -319,7 +319,7 @@ sys.exit(0)'''
self.client_ping_bg_stop({})
script = self.__get_disconnect_script(params)
result = self.client.run("python<<'EOF'\n%s\nEOF\n" % script)
- print "%s: %s" % (self.name, result.stdout[0:-1])
+ print "%s: %s" % (self.name, result.stdout.rstrip())
def client_powersave_on(self, params):
@@ -334,47 +334,48 @@ sys.exit(0)'''
def __client_check(self, param, want):
""" Verify negotiated station mode parameter """
- result = self.router.run("cat %s/%s" %
- (self.client_debugfs_path, param_))
- if result != want:
+ result = self.client.run("cat '%s/%s'" %
+ (self.client_debugfs_path, param))
+ got = result.stdout.rstrip() # NB: chop \n
seano 2010/04/28 19:05:53 unnecessary comment..
+ if got != want:
logging.error("client_check_%s: wanted %s got %s",
- param, want, result)
+ param, want, got)
raise AssertionError
def client_check_bintval(self, params):
""" Verify negotiated beacon interval """
- _self._client_check("beacon_int", params[0])
+ self.__client_check("beacon_int", params[0])
def client_check_dtimperiod(self, params):
""" Verify negotiated DTIM period """
- _self._client_check("dtim_period", params[0])
+ self.__client_check("dtim_period", params[0])
def client_check_rifs(self, params):
""" Verify negotiated RIFS setting """
- _self._client_check("rifs", params[0])
+ self.__client_check("rifs", params[0])
def client_check_shortgi20(self, params):
""" Verify negotiated Short GI setting """
- _self._client_check("sgi20", params[0])
+ self.__client_check("sgi20", params[0])
def client_check_shortgi40(self, params):
""" Verify negotiated Short GI setting """
- _self._client_check("sgi40", params[0])
+ self.__client_check("sgi40", params[0])
def client_check_shortslot(self, params):
""" Verify negotiated Short Slot setting """
- _self._client_check("short_slot", params[0])
+ self.__client_check("short_slot", params[0])
def client_check_protection(self, params):
""" Verify negotiated CTS protection setting """
- _self._client_check("cts_prot", params[0])
+ self.__client_check("cts_prot", params[0])
def client_monitor_start(self, params):
« 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