Skip to content

Commit

Permalink
Making sure logging in minidump unittest is aware when string is none.
Browse files Browse the repository at this point in the history
BUG=chromium:633761

Review-Url: https://codereview.chromium.org/2235693003
Cr-Commit-Position: refs/heads/master@{#411119}
  • Loading branch information
eyaich authored and Commit bot committed Aug 10, 2016
1 parent 4e40c07 commit 170b679
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tools/perf/core/minidump_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ def testSymbolizeMinidump(self):
crash_minidump_path = self._browser.GetMostRecentMinidumpPath()
#self.assertIsNotNone(crash_minidump_path)

logging.info('testSymbolizeMinidump: most recent path = '
+ crash_minidump_path)
if crash_minidump_path is not None:
logging.info('testSymbolizeMinidump: most recent path = '
+ crash_minidump_path)
all_paths = self._browser.GetAllMinidumpPaths()
logging.info('testSymbolizeMinidump: all paths ' + ''.join(all_paths))
all_unsymbolized_paths = self._browser.GetAllUnsymbolizedMinidumpPaths()
Expand All @@ -41,16 +42,16 @@ def testSymbolizeMinidump(self):

@decorators.Isolated
@decorators.Enabled('mac')
@decorators.Disabled('mac') # crbug.com/634156
def testMultipleCrashMinidumps(self):
# Wait for the browser to restart fully before crashing
self._LoadPageThenWait('var cat = "dog";', 'cat')
self._browser.tabs.New().Navigate('chrome://gpucrash', timeout=5)
first_crash_path = self._browser.GetMostRecentMinidumpPath()

#self.assertIsNotNone(first_crash_path)
logging.info('testMultipleCrashMinidumps: first crash most recent path'
+ first_crash_path)
if first_crash_path is not None:
logging.info('testMultipleCrashMinidumps: first crash most recent path'
+ first_crash_path)
all_paths = self._browser.GetAllMinidumpPaths()
logging.info('testMultipleCrashMinidumps: first crash all paths: '
+ ''.join(all_paths))
Expand All @@ -70,8 +71,9 @@ def testMultipleCrashMinidumps(self):
self._browser.tabs.New().Navigate('chrome://gpucrash', timeout=5)
second_crash_path = self._browser.GetMostRecentMinidumpPath()
#self.assertIsNotNone(second_crash_path)
logging.info('testMultipleCrashMinidumps: second crash most recent path'
+ second_crash_path)
if second_crash_path is not None:
logging.info('testMultipleCrashMinidumps: second crash most recent path'
+ second_crash_path)
second_crash_all_paths = self._browser.GetAllMinidumpPaths()
logging.info('testMultipleCrashMinidumps: second crash all paths: '
+ ''.join(second_crash_all_paths))
Expand Down

0 comments on commit 170b679

Please sign in to comment.