| 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 build chrome, executed by buildbot. | 6 """A tool to build 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 # If goma compiler_proxy crashes, there could be crash dump. | 96 # If goma compiler_proxy crashes, there could be crash dump. |
| 97 if options.build_data_dir: | 97 if options.build_data_dir: |
| 98 env['GOMACTL_CRASH_REPORT_ID_FILE'] = os.path.join(options.build_data_dir, | 98 env['GOMACTL_CRASH_REPORT_ID_FILE'] = os.path.join(options.build_data_dir, |
| 99 'crash_report_id_file') | 99 'crash_report_id_file') |
| 100 # We must stop the proxy to dump GomaStats. | 100 # We must stop the proxy to dump GomaStats. |
| 101 chromium_utils.RunCommand(goma_ctl_cmd + ['stop'], env=env) | 101 chromium_utils.RunCommand(goma_ctl_cmd + ['stop'], env=env) |
| 102 override_gsutil = None | 102 override_gsutil = None |
| 103 if options.gsutil_py_path: | 103 if options.gsutil_py_path: |
| 104 override_gsutil = [sys.executable, options.gsutil_py_path] | 104 override_gsutil = [sys.executable, options.gsutil_py_path] |
| 105 goma_utils.UploadGomaCompilerProxyInfo(override_gsutil=override_gsutil) | 105 goma_utils.UploadGomaCompilerProxyInfo(override_gsutil=override_gsutil, |
| 106 builder=options.buildbot_buildername, |
| 107 master=options.buildbot_mastername, |
| 108 slave=options.buildbot_slavename, |
| 109 clobber=options.buildbot_clobber) |
| 106 | 110 |
| 107 # Upload GomaStats to make it monitored. | 111 # Upload GomaStats to make it monitored. |
| 108 if env.get('GOMA_DUMP_STATS_FILE'): | 112 if env.get('GOMA_DUMP_STATS_FILE'): |
| 109 goma_utils.SendGomaStats(env['GOMA_DUMP_STATS_FILE'], | 113 goma_utils.SendGomaStats(env['GOMA_DUMP_STATS_FILE'], |
| 110 env.get('GOMACTL_CRASH_REPORT_ID_FILE'), | 114 env.get('GOMACTL_CRASH_REPORT_ID_FILE'), |
| 111 options.build_data_dir) | 115 options.build_data_dir) |
| 112 | 116 |
| 113 # TODO(tikuta): move to goma_utils.py | 117 # TODO(tikuta): move to goma_utils.py |
| 114 def goma_setup(options, env): | 118 def goma_setup(options, env): |
| 115 """Sets up goma if necessary. | 119 """Sets up goma if necessary. |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 exit_status = main_ninja(options, args, env) | 554 exit_status = main_ninja(options, args, env) |
| 551 | 555 |
| 552 # stop goma | 556 # stop goma |
| 553 goma_teardown(options, env, exit_status, goma_cloudtail) | 557 goma_teardown(options, env, exit_status, goma_cloudtail) |
| 554 | 558 |
| 555 return exit_status | 559 return exit_status |
| 556 | 560 |
| 557 | 561 |
| 558 if '__main__' == __name__: | 562 if '__main__' == __name__: |
| 559 sys.exit(real_main()) | 563 sys.exit(real_main()) |
| OLD | NEW |