| OLD | NEW |
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 '', | 47 '', |
| 48 '4711', | 48 '4711', |
| 49 '--boundary', | 49 '--boundary', |
| 50 'Content-Disposition: form-data; name="upload_file_minidump"; filename="
dump"', | 50 'Content-Disposition: form-data; name="upload_file_minidump"; filename="
dump"', |
| 51 'Content-Type: application/octet-stream', | 51 'Content-Type: application/octet-stream', |
| 52 '', | 52 '', |
| 53 'MDMP', | 53 'MDMP', |
| 54 '--boundary--', | 54 '--boundary--', |
| 55 ] | 55 ] |
| 56 | 56 |
| 57 # TODO: Uncomment this test once the generate_breakpad_symbols.py script has bee
n moved; see | 57 def test_check_generate_breakpad_symbols_actually_exists(self): |
| 58 # https://codereview.chromium.org/1351923002. | 58 host = Host() |
| 59 # def test_check_generate_breakpad_symbols_actually_exists(self): | 59 dump_reader = DumpReaderMultipart(host, build_dir=None) |
| 60 # host = Host() | 60 self.assertTrue(host.filesystem.exists(dump_reader._path_to_generate_bre
akpad_symbols())) |
| 61 # dump_reader = DumpReaderMultipart(host, build_dir=None) | |
| 62 # self.assertTrue(host.filesystem.exists(dump_reader._path_to_generate_b
reakpad_symbols())) | |
| 63 | 61 |
| 64 def test_check_is_functional_breakpad_tools_not_found(self): | 62 def test_check_is_functional_breakpad_tools_not_found(self): |
| 65 host = MockHost() | 63 host = MockHost() |
| 66 | 64 |
| 67 build_dir = "/mock-checkout/out/Debug" | 65 build_dir = "/mock-checkout/out/Debug" |
| 68 host.filesystem.maybe_make_directory(build_dir) | 66 host.filesystem.maybe_make_directory(build_dir) |
| 69 dump_reader = DumpReaderMultipart(host, build_dir) | 67 dump_reader = DumpReaderMultipart(host, build_dir) |
| 70 dump_reader._file_extension = lambda: 'dmp' | 68 dump_reader._file_extension = lambda: 'dmp' |
| 71 dump_reader._binaries_to_symbolize = lambda: ['content_shell'] | 69 dump_reader._binaries_to_symbolize = lambda: ['content_shell'] |
| 72 | 70 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 dump_reader._file_extension = lambda: 'dmp' | 106 dump_reader._file_extension = lambda: 'dmp' |
| 109 dump_reader._binaries_to_symbolize = lambda: ['content_shell'] | 107 dump_reader._binaries_to_symbolize = lambda: ['content_shell'] |
| 110 | 108 |
| 111 self.assertTrue(dump_reader.check_is_functional()) | 109 self.assertTrue(dump_reader.check_is_functional()) |
| 112 self.assertEqual("MOCK output of child process", dump_reader._get_stack_
from_dump(dump_file)) | 110 self.assertEqual("MOCK output of child process", dump_reader._get_stack_
from_dump(dump_file)) |
| 113 self.assertEqual(2, len(host.executive.calls)) | 111 self.assertEqual(2, len(host.executive.calls)) |
| 114 cmd_line = " ".join(host.executive.calls[0]) | 112 cmd_line = " ".join(host.executive.calls[0]) |
| 115 self.assertIn('generate_breakpad_symbols.py', cmd_line) | 113 self.assertIn('generate_breakpad_symbols.py', cmd_line) |
| 116 cmd_line = " ".join(host.executive.calls[1]) | 114 cmd_line = " ".join(host.executive.calls[1]) |
| 117 self.assertIn('minidump_stackwalk', cmd_line) | 115 self.assertIn('minidump_stackwalk', cmd_line) |
| OLD | NEW |