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

Side by Side Diff: server/site_wifitest.py

Issue 6805027: Temporarily change bgscan threshold in MultiSwitchBack (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2011 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 import common, datetime, fnmatch, logging, os, re, string, threading, time 5 import common, datetime, fnmatch, logging, os, re, string, threading, time
6 6
7 from autotest_lib.server import autotest, hosts, subcommand 7 from autotest_lib.server import autotest, hosts, subcommand
8 from autotest_lib.server import site_bsd_router 8 from autotest_lib.server import site_bsd_router
9 from autotest_lib.server import site_linux_router 9 from autotest_lib.server import site_linux_router
10 from autotest_lib.server import site_linux_server 10 from autotest_lib.server import site_linux_server
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 def disable_wifi(self, params): 1160 def disable_wifi(self, params):
1161 wifi = self.__get_wifi_device_path() 1161 wifi = self.__get_wifi_device_path()
1162 if wifi: 1162 if wifi:
1163 self.client.run('%s/test/disable-device %s' % 1163 self.client.run('%s/test/disable-device %s' %
1164 (self.client_cmd_flimflam_lib, wifi)) 1164 (self.client_cmd_flimflam_lib, wifi))
1165 1165
1166 1166
1167 def bgscan_set(self, params): 1167 def bgscan_set(self, params):
1168 """ Control wpa_supplicant bgscan """ 1168 """ Control wpa_supplicant bgscan """
1169 opts = "" 1169 opts = ""
1170 if 'reset' in params:
1171 self.client.run('%s/test/set-bgscan reset' %
1172 self.client_cmd_flimflam_lib)
1170 if params.get('short_interval', None): 1173 if params.get('short_interval', None):
1171 opts += " BgscanShortInterval=%s" % params['short_interval'] 1174 opts += " BgscanShortInterval=%s" % params['short_interval']
1172 if params.get('long_interval', None): 1175 if params.get('long_interval', None):
1173 opts += " BgscanInterval=%s" % params['long_interval'] 1176 opts += " BgscanInterval=%s" % params['long_interval']
1174 if params.get('signal', None): 1177 if params.get('signal', None):
1175 opts += " BgscanSignalThreshold=%s" % params['signal'] 1178 opts += " BgscanSignalThreshold=%s" % params['signal']
1176 if params.get('method', None): 1179 if params.get('method', None):
1177 opts += " BgscanMethod=%s" % params['method'] 1180 opts += " BgscanMethod=%s" % params['method']
1178 self.client.run('%s/test/set-bgscan %s' % 1181 self.client.run('%s/test/set-bgscan %s' %
1179 (self.client_cmd_flimflam_lib, opts)) 1182 (self.client_cmd_flimflam_lib, opts))
1180 1183
1181 1184
1182 def bgscan_disable(self, params): 1185 def bgscan_disable(self, params):
1183 """ Disable wpa_supplicant bgscan """ 1186 """ Disable wpa_supplicant bgscan """
1184 self.bgscan_set({'method' : 'none'}) 1187 self.bgscan_set({'method' : 'none'})
1185 1188
1186 1189
1187 def bgscan_enable(self, params): 1190 def bgscan_enable(self, params):
1188 """ Enable wpa_supplicant bgscan """ 1191 """ Enable wpa_supplicant bgscan """
1189 self.bgscan_set({'method' : 'bgscan'}) 1192 self.bgscan_set({'method' : 'default'})
1190 1193
1191 1194
1192 def time_sync(self, params): 1195 def time_sync(self, params):
1193 for name in params or ['client', 'server', 'router']: 1196 for name in params or ['client', 'server', 'router']:
1194 system = { 'client': self.client, 1197 system = { 'client': self.client,
1195 'server': self.server, 1198 'server': self.server,
1196 'router': self.router }.get(name) 1199 'router': self.router }.get(name)
1197 if not system: 1200 if not system:
1198 raise error.TestFail('time_sync: Must specify ' 1201 raise error.TestFail('time_sync: Must specify '
1199 'router, client or server') 1202 'router, client or server')
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 except error.TestFail: 1442 except error.TestFail:
1440 if 'expect_failure' in testcase: 1443 if 'expect_failure' in testcase:
1441 self.expect_failure(name, testcase['expect_failure']) 1444 self.expect_failure(name, testcase['expect_failure'])
1442 else: 1445 else:
1443 raise 1446 raise
1444 except Exception, e: 1447 except Exception, e:
1445 if 'expect_failure' in testcase: 1448 if 'expect_failure' in testcase:
1446 self.expect_failure(name, testcase['expect_failure']) 1449 self.expect_failure(name, testcase['expect_failure'])
1447 else: 1450 else:
1448 raise 1451 raise
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698