OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 tool to extract size information for chrome, executed by buildbot. | 6 """A tool to extract size information for chrome, executed by buildbot. |
7 | 7 |
8 When this is run, the current directory (cwd) should be the outer build | 8 When this is run, the current directory (cwd) should be the outer build |
9 directory (e.g., chrome-release/build/). | 9 directory (e.g., chrome-release/build/). |
10 | 10 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 def main_win(options, args): | 300 def main_win(options, args): |
301 """Print appropriate size information about built Windows targets. | 301 """Print appropriate size information about built Windows targets. |
302 | 302 |
303 Returns the first non-zero exit status of any command it executes, | 303 Returns the first non-zero exit status of any command it executes, |
304 or zero on success. | 304 or zero on success. |
305 """ | 305 """ |
306 target_dir = os.path.join(options.build_dir, options.target) | 306 target_dir = os.path.join(options.build_dir, options.target) |
307 chrome_dll = os.path.join(target_dir, 'chrome.dll') | 307 chrome_dll = os.path.join(target_dir, 'chrome.dll') |
308 chrome_exe = os.path.join(target_dir, 'chrome.exe') | 308 chrome_exe = os.path.join(target_dir, 'chrome.exe') |
309 mini_installer_exe = os.path.join(target_dir, 'mini_installer.exe') | 309 mini_installer_exe = os.path.join(target_dir, 'mini_installer.exe') |
| 310 npchrome_frame_dll = os.path.join(target_dir, 'npchrome_frame.dll') |
310 setup_exe = os.path.join(target_dir, 'setup.exe') | 311 setup_exe = os.path.join(target_dir, 'setup.exe') |
311 | 312 |
312 result = 0 | 313 result = 0 |
313 | 314 |
314 print 'RESULT chrome.dll: chrome.dll= %s bytes' % get_size(chrome_dll) | 315 print 'RESULT chrome.dll: chrome.dll= %s bytes' % get_size(chrome_dll) |
315 | 316 |
316 print 'RESULT chrome.exe: chrome.exe= %s bytes' % get_size(chrome_exe) | 317 print 'RESULT chrome.exe: chrome.exe= %s bytes' % get_size(chrome_exe) |
317 | 318 |
318 fmt = 'RESULT mini_installer.exe: mini_installer.exe= %s bytes' | 319 fmt = 'RESULT mini_installer.exe: mini_installer.exe= %s bytes' |
319 print fmt % get_size(mini_installer_exe) | 320 print fmt % get_size(mini_installer_exe) |
320 | 321 |
| 322 fmt = 'RESULT npchrome_frame.dll: npchrome_frame.dll= %s bytes' |
| 323 print fmt % get_size(npchrome_frame_dll) |
| 324 |
321 print 'RESULT setup.exe: setup.exe= %s bytes' % get_size(setup_exe) | 325 print 'RESULT setup.exe: setup.exe= %s bytes' % get_size(setup_exe) |
322 | 326 |
323 return result | 327 return result |
324 | 328 |
325 | 329 |
326 def main(): | 330 def main(): |
327 if sys.platform in ('win32', 'cygwin'): | 331 if sys.platform in ('win32', 'cygwin'): |
328 default_platform = 'win' | 332 default_platform = 'win' |
329 elif sys.platform.startswith('darwin'): | 333 elif sys.platform.startswith('darwin'): |
330 default_platform = 'mac' | 334 default_platform = 'mac' |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 else: | 369 else: |
366 sys.stderr.write('Unknown platform %s.\n' % repr(options.platform)) | 370 sys.stderr.write('Unknown platform %s.\n' % repr(options.platform)) |
367 msg = 'Use the --platform= option to specify a supported platform:\n' | 371 msg = 'Use the --platform= option to specify a supported platform:\n' |
368 sys.stderr.write(msg + ' ' + ' '.join(platforms) + '\n') | 372 sys.stderr.write(msg + ' ' + ' '.join(platforms) + '\n') |
369 return 2 | 373 return 2 |
370 return real_main(options, args) | 374 return real_main(options, args) |
371 | 375 |
372 | 376 |
373 if '__main__' == __name__: | 377 if '__main__' == __name__: |
374 sys.exit(main()) | 378 sys.exit(main()) |
OLD | NEW |