OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """A script to find a recently-built Chrome, in the likely places. | 6 """A script to find a recently-built Chrome, in the likely places. |
7 This script is used for automated testing, don't trust it for anything more | 7 This script is used for automated testing, don't trust it for anything more |
8 than that!""" | 8 than that!""" |
9 | 9 |
10 | 10 |
11 import optparse | 11 import optparse |
12 import os | 12 import os |
13 import sys | 13 import sys |
14 | 14 |
15 | 15 |
16 def FindChrome(src_dir, configs, verbose=False): | 16 def FindChrome(src_dir, configs, verbose=False): |
17 # List of places that chrome could live. | 17 # List of places that chrome could live. |
18 # In theory we should be more careful about what platform we're actually | 18 # In theory we should be more careful about what platform we're actually |
19 # building for. | 19 # building for. |
20 # As currently constructed, this will also hork people who have debug and | 20 # As currently constructed, this will also hork people who have debug and |
21 # release builds sitting side by side who build locally. | 21 # release builds sitting side by side who build locally. |
22 chrome_locations = [] | 22 chrome_locations = [] |
23 | 23 |
24 for config in configs: | 24 for config in configs: |
25 chrome_locations.extend([ | 25 chrome_locations.extend([ |
26 'build/%s/chrome.exe' % config, | 26 'build/%s/chrome.exe' % config, |
27 'chrome/%s/chrome.exe' % config, | 27 'chrome/%s/chrome.exe' % config, |
28 # For Linux buildbots. scripts/slave/extract_build.py extracts builds | |
29 # to src/sconsbuild/ rather than src/out/. | |
Nico
2013/10/09 17:36:40
This is not true, see any Linux tester output (e.g
Lei Zhang
2013/10/09 18:59:14
I think it was true at one point. Probably not any
| |
30 'sconsbuild/%s/chrome' % config, | |
31 # Windows Chromium ninja builder | 28 # Windows Chromium ninja builder |
32 'out/%s/chrome.exe' % config, | 29 'out/%s/chrome.exe' % config, |
30 # Linux | |
33 'out/%s/chrome' % config, | 31 'out/%s/chrome' % config, |
34 # Mac Chromium make builder | 32 # Mac Chromium ninja builder |
35 'out/%s/Chromium.app/Contents/MacOS/Chromium' % config, | 33 'out/%s/Chromium.app/Contents/MacOS/Chromium' % config, |
36 # Mac release make builder | 34 # Mac release make builder |
37 'out/%s/Google Chrome.app/Contents/MacOS/Google Chrome' % config, | 35 'out/%s/Google Chrome.app/Contents/MacOS/Google Chrome' % config, |
38 # Mac Chromium xcode builder | 36 # Mac Chromium xcode builder |
39 'xcodebuild/%s/Chromium.app/Contents/MacOS/Chromium' % config, | 37 'xcodebuild/%s/Chromium.app/Contents/MacOS/Chromium' % config, |
40 # Mac release xcode builder | 38 # Mac release xcode builder |
41 'xcodebuild/%s/Google Chrome.app/Contents/MacOS/Google Chrome' % config, | 39 'xcodebuild/%s/Google Chrome.app/Contents/MacOS/Google Chrome' % config, |
42 ]) | 40 ]) |
43 | 41 |
44 # Pick the one with the newest timestamp. | 42 # Pick the one with the newest timestamp. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 sys.stderr.write('Error: Cannot find Chrome. ' | 95 sys.stderr.write('Error: Cannot find Chrome. ' |
98 'Run again with -v to see where was searched.\n') | 96 'Run again with -v to see where was searched.\n') |
99 return 1 | 97 return 1 |
100 | 98 |
101 print chrome_path | 99 print chrome_path |
102 return 0 | 100 return 0 |
103 | 101 |
104 | 102 |
105 if __name__ == '__main__': | 103 if __name__ == '__main__': |
106 sys.exit(main(sys.argv)) | 104 sys.exit(main(sys.argv)) |
OLD | NEW |