Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: buildbot/prebuilt.py

Issue 6871033: Fix typo in Packages URLs. (Closed) Base URL: http://git.chromium.org/git/chromite.git@master
Patch Set: Update unit tests. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | buildbot/prebuilt_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS 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 import datetime 6 import datetime
7 import multiprocessing 7 import multiprocessing
8 import optparse 8 import optparse
9 import os 9 import os
10 import re 10 import re
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 chromiumos-overlay for the host. 564 chromiumos-overlay for the host.
565 """ 565 """
566 # Upload prebuilts. 566 # Upload prebuilts.
567 package_path = os.path.join(build_path, _HOST_PACKAGES_PATH) 567 package_path = os.path.join(build_path, _HOST_PACKAGES_PATH)
568 url_suffix = _REL_HOST_PATH % {'version': version, 'target': _HOST_TARGET} 568 url_suffix = _REL_HOST_PATH % {'version': version, 'target': _HOST_TARGET}
569 packages_url_suffix = '%s/packages' % url_suffix.rstrip('/') 569 packages_url_suffix = '%s/packages' % url_suffix.rstrip('/')
570 self._UploadPrebuilt(package_path, packages_url_suffix) 570 self._UploadPrebuilt(package_path, packages_url_suffix)
571 571
572 # Record URL where prebuilts were uploaded. 572 # Record URL where prebuilts were uploaded.
573 url_value = '%s/%s/' % (self._binhost_base_url.rstrip('/'), 573 url_value = '%s/%s/' % (self._binhost_base_url.rstrip('/'),
574 url_suffix.rstrip('/')) 574 packages_url_suffix.rstrip('/'))
575 if git_sync: 575 if git_sync:
576 git_file = os.path.join(build_path, _PREBUILT_MAKE_CONF[_HOST_TARGET]) 576 git_file = os.path.join(build_path, _PREBUILT_MAKE_CONF[_HOST_TARGET])
577 RevGitFile(git_file, url_value, key=key) 577 RevGitFile(git_file, url_value, key=key)
578 if sync_binhost_conf: 578 if sync_binhost_conf:
579 binhost_conf = os.path.join(build_path, _BINHOST_CONF_DIR, 'host', 579 binhost_conf = os.path.join(build_path, _BINHOST_CONF_DIR, 'host',
580 '%s-%s.conf' % (_HOST_TARGET, key)) 580 '%s-%s.conf' % (_HOST_TARGET, key))
581 UpdateBinhostConfFile(binhost_conf, key, url_value) 581 UpdateBinhostConfFile(binhost_conf, key, url_value)
582 582
583 def _SyncBoardPrebuilts(self, board, build_path, version, key, git_sync, 583 def _SyncBoardPrebuilts(self, board, build_path, version, key, git_sync,
584 sync_binhost_conf, upload_board_tarball): 584 sync_binhost_conf, upload_board_tarball):
(...skipping 25 matching lines...) Expand all
610 # Upload prebuilts. 610 # Upload prebuilts.
611 self._UploadPrebuilt(package_path, packages_url_suffix) 611 self._UploadPrebuilt(package_path, packages_url_suffix)
612 612
613 # Make sure we finished uploading the board tarballs. 613 # Make sure we finished uploading the board tarballs.
614 if upload_board_tarball: 614 if upload_board_tarball:
615 tar_process.join() 615 tar_process.join()
616 assert tar_process.exitcode == 0 616 assert tar_process.exitcode == 0
617 617
618 # Record URL where prebuilts were uploaded. 618 # Record URL where prebuilts were uploaded.
619 url_value = '%s/%s/' % (self._binhost_base_url.rstrip('/'), 619 url_value = '%s/%s/' % (self._binhost_base_url.rstrip('/'),
620 url_suffix.rstrip('/')) 620 packages_url_suffix.rstrip('/'))
621 if git_sync: 621 if git_sync:
622 git_file = DeterminePrebuiltConfFile(build_path, board) 622 git_file = DeterminePrebuiltConfFile(build_path, board)
623 RevGitFile(git_file, url_value, key=key) 623 RevGitFile(git_file, url_value, key=key)
624 if sync_binhost_conf: 624 if sync_binhost_conf:
625 binhost_conf = os.path.join(build_path, _BINHOST_CONF_DIR, 'target', 625 binhost_conf = os.path.join(build_path, _BINHOST_CONF_DIR, 'target',
626 '%s-%s.conf' % (board, key)) 626 '%s-%s.conf' % (board, key))
627 UpdateBinhostConfFile(binhost_conf, key, url_value) 627 UpdateBinhostConfFile(binhost_conf, key, url_value)
628 628
629 629
630 def usage(parser, msg): 630 def usage(parser, msg):
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 options.git_sync, options.sync_binhost_conf) 731 options.git_sync, options.sync_binhost_conf)
732 732
733 if options.board: 733 if options.board:
734 uploader._SyncBoardPrebuilts(options.board, options.build_path, version, 734 uploader._SyncBoardPrebuilts(options.board, options.build_path, version,
735 options.key, options.git_sync, 735 options.key, options.git_sync,
736 options.sync_binhost_conf, 736 options.sync_binhost_conf,
737 options.upload_board_tarball) 737 options.upload_board_tarball)
738 738
739 if __name__ == '__main__': 739 if __name__ == '__main__':
740 main() 740 main()
OLDNEW
« no previous file with comments | « no previous file | buildbot/prebuilt_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698