OLD | NEW |
1 # Copyright (c) 2009 Google Inc. All rights reserved. | 1 # Copyright (c) 2009 Google Inc. All rights reserved. |
2 # Copyright (c) 2009 Apple Inc. All rights reserved. | 2 # Copyright (c) 2009 Apple Inc. All rights reserved. |
3 # Copyright (c) 2012 Intel Corporation. All rights reserved. | 3 # Copyright (c) 2012 Intel Corporation. All rights reserved. |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 15 matching lines...) Expand all Loading... |
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 |
31 import fnmatch | 31 import fnmatch |
32 import re | 32 import re |
33 | 33 |
34 from optparse import make_option | 34 from optparse import make_option |
35 | 35 |
36 from webkitpy.common.system.crashlogs import CrashLogs | 36 from webkitpy.common.system.crash_logs import CrashLogs |
37 from webkitpy.tool.commands.command import Command | 37 from webkitpy.tool.commands.command import Command |
38 from webkitpy.layout_tests.models.test_expectations import TestExpectations | 38 from webkitpy.layout_tests.models.test_expectations import TestExpectations |
39 from webkitpy.layout_tests.port.factory import platform_options | 39 from webkitpy.layout_tests.port.factory import platform_options |
40 | 40 |
41 | 41 |
42 class CrashLog(Command): | 42 class CrashLog(Command): |
43 name = "crash-log" | 43 name = "crash-log" |
44 help_text = "Print the newest crash log for the given process" | 44 help_text = "Print the newest crash log for the given process" |
45 show_in_main_help = True | 45 show_in_main_help = True |
46 long_help = """Finds the newest crash log matching the given process name | 46 long_help = """Finds the newest crash log matching the given process name |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 print "%s,%s,%s,%s,%s,%s" % (port_name, test_name, self._pla
tform_for_path(test_name), | 200 print "%s,%s,%s,%s,%s,%s" % (port_name, test_name, self._pla
tform_for_path(test_name), |
201 extension[1:], baseline_locatio
n, self._platform_for_path(baseline_location)) | 201 extension[1:], baseline_locatio
n, self._platform_for_path(baseline_location)) |
202 else: | 202 else: |
203 print baseline_location | 203 print baseline_location |
204 | 204 |
205 def _platform_for_path(self, relpath): | 205 def _platform_for_path(self, relpath): |
206 platform_matchobj = self._platform_regexp.match(relpath) | 206 platform_matchobj = self._platform_regexp.match(relpath) |
207 if platform_matchobj: | 207 if platform_matchobj: |
208 return platform_matchobj.group(1) | 208 return platform_matchobj.group(1) |
209 return None | 209 return None |
OLD | NEW |