OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright 2015 The Crashpad Authors. All rights reserved. | 3 # Copyright 2015 The Crashpad Authors. All rights reserved. |
4 # | 4 # |
5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
8 # | 8 # |
9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
10 # | 10 # |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 if False: # The code for these isn't landed yet. | 180 if False: # The code for these isn't landed yet. |
181 out = CdbRun(cdb_path, dump_path, '!locks') | 181 out = CdbRun(cdb_path, dump_path, '!locks') |
182 out.Check(r'CritSec crashy_program!crashpad::`anonymous namespace\'::' | 182 out.Check(r'CritSec crashy_program!crashpad::`anonymous namespace\'::' |
183 r'g_test_critical_section', 'lock was captured') | 183 r'g_test_critical_section', 'lock was captured') |
184 out.Check(r'\*\*\* Locked', 'lock debug info was captured, and is locked') | 184 out.Check(r'\*\*\* Locked', 'lock debug info was captured, and is locked') |
185 | 185 |
186 | 186 |
187 def main(args): | 187 def main(args): |
188 try: | 188 try: |
189 if len(args) != 1: | 189 if len(args) != 1: |
190 print >>sys.stderr, 'must supply out dir' | 190 print >>sys.stderr, 'must supply binary dir' |
191 return 1 | 191 return 1 |
192 | 192 |
193 cdb_path = GetCdbPath() | 193 cdb_path = GetCdbPath() |
194 if not cdb_path: | 194 if not cdb_path: |
195 print >>sys.stderr, 'could not find cdb' | 195 print >>sys.stderr, 'could not find cdb' |
196 return 1 | 196 return 1 |
197 | 197 |
198 pipe_name = r'\\.\pipe\end-to-end_%s_%s' % ( | 198 pipe_name = r'\\.\pipe\end-to-end_%s_%s' % ( |
199 os.getpid(), str(random.getrandbits(64))) | 199 os.getpid(), str(random.getrandbits(64))) |
200 | 200 |
201 dump_path = GetDumpFromCrashyProgram(args[0], pipe_name) | 201 dump_path = GetDumpFromCrashyProgram(args[0], pipe_name) |
202 if not dump_path: | 202 if not dump_path: |
203 return 1 | 203 return 1 |
204 | 204 |
205 RunTests(cdb_path, dump_path, pipe_name) | 205 RunTests(cdb_path, dump_path, pipe_name) |
206 | 206 |
207 return 0 | 207 return 0 |
208 finally: | 208 finally: |
209 CleanUpTempDirs() | 209 CleanUpTempDirs() |
210 | 210 |
211 | 211 |
212 if __name__ == '__main__': | 212 if __name__ == '__main__': |
213 sys.exit(main(sys.argv[1:])) | 213 sys.exit(main(sys.argv[1:])) |
OLD | NEW |