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): |