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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 def CleanUpTempDirs(): | 35 def CleanUpTempDirs(): |
36 global g_temp_dirs | 36 global g_temp_dirs |
37 for d in g_temp_dirs: | 37 for d in g_temp_dirs: |
38 subprocess.call(['rmdir', '/s', '/q', d], shell=True) | 38 subprocess.call(['rmdir', '/s', '/q', d], shell=True) |
39 | 39 |
40 | 40 |
41 def FindInstalledWindowsApplication(app_path): | 41 def FindInstalledWindowsApplication(app_path): |
42 search_paths = [os.getenv('PROGRAMFILES(X86)'), | 42 search_paths = [os.getenv('PROGRAMFILES(X86)'), |
43 os.getenv('PROGRAMFILES'), | 43 os.getenv('PROGRAMFILES'), |
| 44 os.getenv('PROGRAMW6432'), |
44 os.getenv('LOCALAPPDATA')] | 45 os.getenv('LOCALAPPDATA')] |
45 search_paths += os.getenv('PATH', '').split(os.pathsep) | 46 search_paths += os.getenv('PATH', '').split(os.pathsep) |
46 | 47 |
47 for search_path in search_paths: | 48 for search_path in search_paths: |
48 if not search_path: | 49 if not search_path: |
49 continue | 50 continue |
50 path = os.path.join(search_path, app_path) | 51 path = os.path.join(search_path, app_path) |
51 if os.path.isfile(path): | 52 if os.path.isfile(path): |
52 return path | 53 return path |
53 | 54 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 245 |
245 RunTests(cdb_path, crashy_dump_path, destroyed_dump_path, pipe_name) | 246 RunTests(cdb_path, crashy_dump_path, destroyed_dump_path, pipe_name) |
246 | 247 |
247 return 0 | 248 return 0 |
248 finally: | 249 finally: |
249 CleanUpTempDirs() | 250 CleanUpTempDirs() |
250 | 251 |
251 | 252 |
252 if __name__ == '__main__': | 253 if __name__ == '__main__': |
253 sys.exit(main(sys.argv[1:])) | 254 sys.exit(main(sys.argv[1:])) |
OLD | NEW |