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

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

Issue 3338019: [autotest] Grab more chrome logs, not just the last one, to hedge against crashes (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: fixes per rginda, seano 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
« client/bin/site_login.py ('K') | « client/bin/site_login.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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 method as well. 232 method as well.
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 logpath = chromeos_constants.CHROME_LOG_DIR
243
242 try: 244 try:
243 shutil.copy(chromeos_constants.CHROME_LOG_DIR+'/chrome', 245 for file in os.listdir(logpath):
244 self.resultsdir+'/chrome_prelogin_log') 246 fullpath = os.path.join(logpath, file)
247 if os.path.isfile(fullpath):
248 shutil.copy(fullpath, os.path.join(self.resultsdir, file))
249
245 except (IOError, OSError) as error: 250 except (IOError, OSError) as error:
246 logging.error(error) 251 logging.error(error)
247 252
248 if site_login.logged_in(): 253 if site_login.logged_in():
249 try: 254 try:
250 shutil.copy(chromeos_constants.CRYPTOHOME_MOUNT_PT+'/chrome', 255 shutil.copy(chromeos_constants.CRYPTOHOME_MOUNT_PT+'/chrome',
251 self.resultsdir+'/chrome_postlogin_log') 256 self.resultsdir+'/chrome_postlogin_log')
252 except (IOError, OSError) as error: 257 except (IOError, OSError) as error:
253 logging.error(error) 258 logging.error(error)
254 self.logout() 259 self.logout()
255 260
256 self.stop_authserver() 261 self.stop_authserver()
257 262
258 263
259 def get_auth_endpoint_misses(self): 264 def get_auth_endpoint_misses(self):
260 if hasattr(self, '_authServer'): 265 if hasattr(self, '_authServer'):
261 return self._authServer.get_endpoint_misses() 266 return self._authServer.get_endpoint_misses()
262 else: 267 else:
263 return {} 268 return {}
OLDNEW
« client/bin/site_login.py ('K') | « client/bin/site_login.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698