OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Integration test for breakpad in content shell. | 7 """Integration test for breakpad in content shell. |
8 | 8 |
9 This test checks that content shell and breakpad are correctly hooked up, as | 9 This test checks that content shell and breakpad are correctly hooked up, as |
10 well as that the tools can symbolize a stack trace.""" | 10 well as that the tools can symbolize a stack trace.""" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 '--symbols-dir=%s' % symbols_dir, | 68 '--symbols-dir=%s' % symbols_dir, |
69 '--jobs=%d' % options.jobs] | 69 '--jobs=%d' % options.jobs] |
70 if options.verbose: | 70 if options.verbose: |
71 cmd.append('--verbose') | 71 cmd.append('--verbose') |
72 print ' '.join(cmd) | 72 print ' '.join(cmd) |
73 failure = 'Failed to run generate_breakpad_symbols.py.' | 73 failure = 'Failed to run generate_breakpad_symbols.py.' |
74 subprocess.check_call(cmd) | 74 subprocess.check_call(cmd) |
75 | 75 |
76 print "# Run content_shell and make it crash." | 76 print "# Run content_shell and make it crash." |
77 cmd = [options.binary, | 77 cmd = [options.binary, |
78 '--run-layout-test', | 78 '--dump-render-tree', |
79 'chrome://crash', | 79 'chrome://crash', |
80 '--enable-crash-reporter', | 80 '--enable-crash-reporter', |
81 '--crash-dumps-dir=%s' % crash_dir] | 81 '--crash-dumps-dir=%s' % crash_dir] |
82 if options.verbose: | 82 if options.verbose: |
83 print ' '.join(cmd) | 83 print ' '.join(cmd) |
84 failure = 'Failed to run content_shell.' | 84 failure = 'Failed to run content_shell.' |
85 if options.verbose: | 85 if options.verbose: |
86 subprocess.check_call(cmd) | 86 subprocess.check_call(cmd) |
87 else: | 87 else: |
88 with open(os.devnull, 'w') as devnull: | 88 with open(os.devnull, 'w') as devnull: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 finally: | 139 finally: |
140 try: | 140 try: |
141 shutil.rmtree(crash_dir) | 141 shutil.rmtree(crash_dir) |
142 except: | 142 except: |
143 print 'Failed to delete temp directory "%s".' % crash_dir | 143 print 'Failed to delete temp directory "%s".' % crash_dir |
144 | 144 |
145 | 145 |
146 if '__main__' == __name__: | 146 if '__main__' == __name__: |
147 sys.exit(main()) | 147 sys.exit(main()) |
OLD | NEW |