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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader_win.py

Issue 546133003: Reformat webkitpy.layout_tests w/ format-webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 19 matching lines...) Expand all
30 import os 30 import os
31 import shlex 31 import shlex
32 32
33 from webkitpy.layout_tests.breakpad.dump_reader import DumpReader 33 from webkitpy.layout_tests.breakpad.dump_reader import DumpReader
34 34
35 35
36 _log = logging.getLogger(__name__) 36 _log = logging.getLogger(__name__)
37 37
38 38
39 class DumpReaderWin(DumpReader): 39 class DumpReaderWin(DumpReader):
40
40 """DumpReader for windows breakpad.""" 41 """DumpReader for windows breakpad."""
41 42
42 def __init__(self, host, build_dir): 43 def __init__(self, host, build_dir):
43 super(DumpReaderWin, self).__init__(host, build_dir) 44 super(DumpReaderWin, self).__init__(host, build_dir)
44 self._cdb_available = None 45 self._cdb_available = None
45 46
46 def check_is_functional(self): 47 def check_is_functional(self):
47 return self._check_cdb_available() 48 return self._check_cdb_available()
48 49
49 def _file_extension(self): 50 def _file_extension(self):
(...skipping 18 matching lines...) Expand all
68 return None 69 return None
69 70
70 def _find_depot_tools_path(self): 71 def _find_depot_tools_path(self):
71 """Attempt to find depot_tools location in PATH.""" 72 """Attempt to find depot_tools location in PATH."""
72 for i in os.environ['PATH'].split(os.pathsep): 73 for i in os.environ['PATH'].split(os.pathsep):
73 if os.path.isfile(os.path.join(i, 'gclient')): 74 if os.path.isfile(os.path.join(i, 'gclient')):
74 return i 75 return i
75 76
76 def _check_cdb_available(self): 77 def _check_cdb_available(self):
77 """Checks whether we can use cdb to symbolize minidumps.""" 78 """Checks whether we can use cdb to symbolize minidumps."""
78 if self._cdb_available != None: 79 if self._cdb_available is not None:
79 return self._cdb_available 80 return self._cdb_available
80 81
81 CDB_LOCATION_TEMPLATES = [ 82 CDB_LOCATION_TEMPLATES = [
82 '%s\\Debugging Tools For Windows', 83 '%s\\Debugging Tools For Windows',
83 '%s\\Debugging Tools For Windows (x86)', 84 '%s\\Debugging Tools For Windows (x86)',
84 '%s\\Debugging Tools For Windows (x64)', 85 '%s\\Debugging Tools For Windows (x64)',
85 '%s\\Windows Kits\\8.0\\Debuggers\\x86', 86 '%s\\Windows Kits\\8.0\\Debuggers\\x86',
86 '%s\\Windows Kits\\8.0\\Debuggers\\x64', 87 '%s\\Windows Kits\\8.0\\Debuggers\\x64',
87 '%s\\Windows Kits\\8.1\\Debuggers\\x86', 88 '%s\\Windows Kits\\8.1\\Debuggers\\x86',
88 '%s\\Windows Kits\\8.1\\Debuggers\\x64', 89 '%s\\Windows Kits\\8.1\\Debuggers\\x64',
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 pass 128 pass
128 else: 129 else:
129 self._cdb_path = cdb 130 self._cdb_path = cdb
130 self._cdb_available = True 131 self._cdb_available = True
131 return self._cdb_available 132 return self._cdb_available
132 133
133 _log.warning("CDB is not installed; can't symbolize minidumps.") 134 _log.warning("CDB is not installed; can't symbolize minidumps.")
134 _log.warning('') 135 _log.warning('')
135 self._cdb_available = False 136 self._cdb_available = False
136 return self._cdb_available 137 return self._cdb_available
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698