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

Side by Side Diff: client/bin/site_ui_test.py

Issue 3234004: [autotest] Fix chrome log collection (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 3 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
« no previous file with comments | « client/bin/chromeos_constants.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import dbus, logging, os, shutil, socket, sys, time 5 import dbus, logging, os, shutil, socket, sys, time
6 from autotest_lib.client.bin import chromeos_constants 6 from autotest_lib.client.bin import chromeos_constants
7 from autotest_lib.client.bin import site_login, site_utils, test as bin_test 7 from autotest_lib.client.bin import site_login, site_utils, test as bin_test
8 from autotest_lib.client.common_lib import error, site_ui 8 from autotest_lib.client.common_lib import error, site_ui
9 from autotest_lib.client.common_lib import site_auth_server, site_dns_server 9 from autotest_lib.client.common_lib import site_auth_server, site_dns_server
10 from dbus.mainloop.glib import DBusGMainLoop 10 from dbus.mainloop.glib import DBusGMainLoop
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 """ 233 """
234 self.revert_dns() 234 self.revert_dns()
235 self._authServer.stop() 235 self._authServer.stop()
236 self._dnsServer.stop() 236 self._dnsServer.stop()
237 237
238 238
239 def cleanup(self): 239 def cleanup(self):
240 """Overridden from test.cleanup() to log out when the test is complete. 240 """Overridden from test.cleanup() to log out when the test is complete.
241 """ 241 """
242 try: 242 try:
243 shutil.copy(chromeos_constants.USER_DATA_DIR+'/chrome_log', 243 shutil.copy(chromeos_constants.CHROME_LOG_DIR+'/chrome',
244 self.resultsdir+'/chrome_prelogin_log') 244 self.resultsdir+'/chrome_prelogin_log')
245 except (IOError, OSError) as error: 245 except (IOError, OSError) as error:
246 logging.error(error) 246 logging.error(error)
247 247
248 if site_login.logged_in(): 248 if site_login.logged_in():
249 try: 249 try:
250 shutil.copy(chromeos_constants.USER_DATA_DIR+'/user/chrome_log', 250 shutil.copy(chromeos_constants.CRYPTOHOME_MOUNT_PT+'/chrome',
251 self.resultsdir+'/chrome_postlogin_log') 251 self.resultsdir+'/chrome_postlogin_log')
252 except (IOError, OSError) as error: 252 except (IOError, OSError) as error:
253 logging.error(error) 253 logging.error(error)
254 self.logout() 254 self.logout()
255 255
256 self.stop_authserver() 256 self.stop_authserver()
257 257
258 258
259 def get_auth_endpoint_misses(self): 259 def get_auth_endpoint_misses(self):
260 if hasattr(self, '_authServer'): 260 if hasattr(self, '_authServer'):
261 return self._authServer.get_endpoint_misses() 261 return self._authServer.get_endpoint_misses()
262 else: 262 else:
263 return {} 263 return {}
OLDNEW
« no previous file with comments | « client/bin/chromeos_constants.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698