| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 import multiprocessing | 7 import multiprocessing |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import subprocess | 10 import subprocess |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 if process.returncode != 0: | 253 if process.returncode != 0: |
| 254 NotifyBuildDone(build_config, success=False, start=start_time) | 254 NotifyBuildDone(build_config, success=False, start=start_time) |
| 255 return 1 | 255 return 1 |
| 256 else: | 256 else: |
| 257 NotifyBuildDone(build_config, success=True, start=start_time) | 257 NotifyBuildDone(build_config, success=True, start=start_time) |
| 258 | 258 |
| 259 return 0 | 259 return 0 |
| 260 | 260 |
| 261 | 261 |
| 262 def RunOneGomaBuildCommand(args): | 262 def RunOneGomaBuildCommand(args): |
| 263 print ' '.join(args) | 263 try: |
| 264 process = subprocess.Popen(args, stdin=None) | 264 print ' '.join(args) |
| 265 process.wait() | 265 process = subprocess.Popen(args, stdin=None) |
| 266 print (' '.join(args) + " done.") | 266 process.wait() |
| 267 return process.returncode | 267 print (' '.join(args) + " done.") |
| 268 return process.returncode |
| 269 except KeyboardInterrupt: |
| 270 return 1 |
| 268 | 271 |
| 269 | 272 |
| 270 def Main(): | 273 def Main(): |
| 271 starttime = time.time() | 274 starttime = time.time() |
| 272 # Parse the options. | 275 # Parse the options. |
| 273 parser = BuildOptions() | 276 parser = BuildOptions() |
| 274 (options, args) = parser.parse_args() | 277 (options, args) = parser.parse_args() |
| 275 if not ProcessOptions(options, args): | 278 if not ProcessOptions(options, args): |
| 276 parser.print_help() | 279 parser.print_help() |
| 277 return 1 | 280 return 1 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 305 if r != 0: | 308 if r != 0: |
| 306 return 1 | 309 return 1 |
| 307 | 310 |
| 308 endtime = time.time() | 311 endtime = time.time() |
| 309 print ("The build took %.3f seconds" % (endtime - starttime)) | 312 print ("The build took %.3f seconds" % (endtime - starttime)) |
| 310 return 0 | 313 return 0 |
| 311 | 314 |
| 312 | 315 |
| 313 if __name__ == '__main__': | 316 if __name__ == '__main__': |
| 314 sys.exit(Main()) | 317 sys.exit(Main()) |
| OLD | NEW |