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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 assert options.goma_jobs | 425 assert options.goma_jobs |
426 command.append('-j%d' % options.goma_jobs) | 426 command.append('-j%d' % options.goma_jobs) |
427 | 427 |
428 # Run the build. | 428 # Run the build. |
429 env.print_overrides() | 429 env.print_overrides() |
430 exit_status = chromium_utils.RunCommand(command, env=env) | 430 exit_status = chromium_utils.RunCommand(command, env=env) |
431 if exit_status == 0 and options.ninja_ensure_up_to_date: | 431 if exit_status == 0 and options.ninja_ensure_up_to_date: |
432 # Run the build again if we want to check that the no-op build is clean. | 432 # Run the build again if we want to check that the no-op build is clean. |
433 filter_obj = EnsureUpToDateFilter() | 433 filter_obj = EnsureUpToDateFilter() |
434 # Append `-d explain` to help diagnose in the failure case. | 434 # Append `-d explain` to help diagnose in the failure case. |
435 command += ['-d', 'explain'] | 435 command += ['-d', 'explain', '-n'] |
436 chromium_utils.RunCommand(command, env=env, filter_obj=filter_obj) | 436 chromium_utils.RunCommand(command, env=env, filter_obj=filter_obj) |
437 if not filter_obj.was_up_to_date: | 437 if not filter_obj.was_up_to_date: |
438 print 'Failing build because ninja reported work to do.' | 438 print 'Failing build because ninja reported work to do.' |
439 print 'This means that after completing a compile, another was run and' | 439 print 'This means that after completing a compile, another was run and' |
440 print 'it resulted in still having work to do (that is, a no-op build' | 440 print 'it resulted in still having work to do (that is, a no-op build' |
441 print 'wasn\'t a no-op). Consult the first "ninja explain:" line for a' | 441 print 'wasn\'t a no-op). Consult the first "ninja explain:" line for a' |
442 print 'likely culprit.' | 442 print 'likely culprit.' |
443 return 1 | 443 return 1 |
444 return exit_status | 444 return exit_status |
445 finally: | 445 finally: |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 exit_status = main_ninja(options, args, env) | 566 exit_status = main_ninja(options, args, env) |
567 | 567 |
568 # stop goma | 568 # stop goma |
569 goma_teardown(options, env, exit_status, goma_cloudtail) | 569 goma_teardown(options, env, exit_status, goma_cloudtail) |
570 | 570 |
571 return exit_status | 571 return exit_status |
572 | 572 |
573 | 573 |
574 if '__main__' == __name__: | 574 if '__main__' == __name__: |
575 sys.exit(real_main()) | 575 sys.exit(real_main()) |
OLD | NEW |