OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """CBuildbot is wrapper around the build process used by the pre-flight queue""" | 7 """CBuildbot is wrapper around the build process used by the pre-flight queue""" |
8 | 8 |
9 import errno | 9 import errno |
10 import heapq | 10 import heapq |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 results_path = os.path.join(buildroot, 'chroot', test_results_dir) | 419 results_path = os.path.join(buildroot, 'chroot', test_results_dir) |
420 RunCommand(['sudo', 'chmod', '-R', '+r', results_path]) | 420 RunCommand(['sudo', 'chmod', '-R', '+r', results_path]) |
421 try: | 421 try: |
422 shutil.copytree(results_path, archive_target) | 422 shutil.copytree(results_path, archive_target) |
423 except: | 423 except: |
424 Warning('Some files could not be copied') | 424 Warning('Some files could not be copied') |
425 | 425 |
426 image_name = 'chromiumos_qemu_image.bin' | 426 image_name = 'chromiumos_qemu_image.bin' |
427 image_path = os.path.join(buildroot, 'src', 'build', 'images', board, | 427 image_path = os.path.join(buildroot, 'src', 'build', 'images', board, |
428 'latest', image_name) | 428 'latest', image_name) |
429 RunCommand(['gzip', '-f', image_path]) | 429 RunCommand(['gzip', '-f', '--fast', image_path]) |
430 shutil.copyfile(image_path + '.gz', os.path.join(archive_target, | 430 shutil.copyfile(image_path + '.gz', os.path.join(archive_target, |
431 image_name + '.gz')) | 431 image_name + '.gz')) |
432 | 432 |
433 | 433 |
434 | 434 |
435 def _GetConfig(config_name): | 435 def _GetConfig(config_name): |
436 """Gets the configuration for the build""" | 436 """Gets the configuration for the build""" |
437 default = config['default'] | 437 default = config['default'] |
438 buildconfig = {} | 438 buildconfig = {} |
439 if not config.has_key(config_name): | 439 if not config.has_key(config_name): |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 except: | 543 except: |
544 # Send failure to master bot. | 544 # Send failure to master bot. |
545 if not buildconfig['master'] and buildconfig['important']: | 545 if not buildconfig['master'] and buildconfig['important']: |
546 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) | 546 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) |
547 | 547 |
548 raise | 548 raise |
549 | 549 |
550 | 550 |
551 if __name__ == '__main__': | 551 if __name__ == '__main__': |
552 main() | 552 main() |
OLD | NEW |