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

Side by Side Diff: client/site_tests/network_3GSmokeTest/network_3GSmokeTest.py

Issue 6479003: Move site_backchannel and site_tpm module into client/cros dir. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 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 from autotest_lib.client.bin import site_backchannel, test, utils 5 from autotest_lib.client.bin import test, utils
6 from autotest_lib.client.common_lib import error 6 from autotest_lib.client.common_lib import error
7 from autotest_lib.client.cros import backchannel
7 8
8 import logging, re, socket, string, time, urllib2 9 import logging, re, socket, string, time, urllib2
9 import dbus, dbus.mainloop.glib, gobject 10 import dbus, dbus.mainloop.glib, gobject
10 11
11 from autotest_lib.client.cros import flimflam_test_path 12 from autotest_lib.client.cros import flimflam_test_path
12 import flimflam, routing, mm 13 import flimflam, routing, mm
13 14
14 SERVER = 'testing-chargen.appspot.com' 15 SERVER = 'testing-chargen.appspot.com'
15 BASE_URL = 'http://' + SERVER + '/' 16 BASE_URL = 'http://' + SERVER + '/'
16 17
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 if len(self.GetModemInfo()) != len(modem_info): 220 if len(self.GetModemInfo()) != len(modem_info):
220 logging.info('NewInfo: %s' % ', '.join(self.GetModemInfo())) 221 logging.info('NewInfo: %s' % ', '.join(self.GetModemInfo()))
221 raise error.TestFail('Test shutdown: ' 222 raise error.TestFail('Test shutdown: '
222 'failed to leave modem in working state.') 223 'failed to leave modem in working state.')
223 224
224 if sleep_kludge: 225 if sleep_kludge:
225 logging.info('Sleeping for %.1f seconds', sleep_kludge) 226 logging.info('Sleeping for %.1f seconds', sleep_kludge)
226 time.sleep(sleep_kludge) 227 time.sleep(sleep_kludge)
227 228
228 def run_once(self, connect_count=5, sleep_kludge=5): 229 def run_once(self, connect_count=5, sleep_kludge=5):
229 site_backchannel.setup() 230 backchannel.setup()
230 time.sleep(3) 231 time.sleep(3)
231 self.flim = flimflam.FlimFlam() 232 self.flim = flimflam.FlimFlam()
232 self.device_manager = flimflam.DeviceManager(self.flim) 233 self.device_manager = flimflam.DeviceManager(self.flim)
233 try: 234 try:
234 self.device_manager.ShutdownAllExcept('cellular') 235 self.device_manager.ShutdownAllExcept('cellular')
235 self.run_once_internal(connect_count, sleep_kludge) 236 self.run_once_internal(connect_count, sleep_kludge)
236 finally: 237 finally:
237 try: 238 try:
238 self.device_manager.RestoreDevices() 239 self.device_manager.RestoreDevices()
239 finally: 240 finally:
240 site_backchannel.teardown() 241 backchannel.teardown()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698