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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 try: | 188 try: |
189 if len(args) != 1: | 189 if len(args) != 1: |
190 print >>sys.stderr, 'must supply binary 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 # Make sure we can download Windows symbols. | |
199 if not os.environ.get('_NT_SYMBOL_PATH'): | |
200 symbol_dir = MakeTempDir() | |
201 os.environ['_NT_SYMBOL_PATH'] = ( | |
202 'SRV*' + symbol_dir + '*https://msdl.microsoft.com/download/symbols') | |
brucedawson
2015/10/09 23:30:55
Doesn't first-time use of Microsoft's symbol serve
| |
203 | |
198 pipe_name = r'\\.\pipe\end-to-end_%s_%s' % ( | 204 pipe_name = r'\\.\pipe\end-to-end_%s_%s' % ( |
199 os.getpid(), str(random.getrandbits(64))) | 205 os.getpid(), str(random.getrandbits(64))) |
200 | 206 |
201 dump_path = GetDumpFromCrashyProgram(args[0], pipe_name) | 207 dump_path = GetDumpFromCrashyProgram(args[0], pipe_name) |
202 if not dump_path: | 208 if not dump_path: |
203 return 1 | 209 return 1 |
204 | 210 |
205 RunTests(cdb_path, dump_path, pipe_name) | 211 RunTests(cdb_path, dump_path, pipe_name) |
206 | 212 |
207 return 0 | 213 return 0 |
208 finally: | 214 finally: |
209 CleanUpTempDirs() | 215 CleanUpTempDirs() |
210 | 216 |
211 | 217 |
212 if __name__ == '__main__': | 218 if __name__ == '__main__': |
213 sys.exit(main(sys.argv[1:])) | 219 sys.exit(main(sys.argv[1:])) |
OLD | NEW |