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

Side by Side Diff: buildbot/prebuilt_unittest.py

Issue 6677023: Update prebuilt.py to handle private google storage uploads. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/chromite@master
Patch Set: Add more error handling around the ACL file/canned ACLs Created 9 years, 9 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
« buildbot/prebuilt.py ('K') | « buildbot/prebuilt.py ('k') | no next file » | 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 copy 6 import copy
7 import mox 7 import mox
8 import os 8 import os
9 import shutil 9 import shutil
10 import sys 10 import sys
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 options.build_path = '/trunk' 497 options.build_path = '/trunk'
498 options.private = True 498 options.private = True
499 options.sync_host = True 499 options.sync_host = True
500 options.git_sync = True 500 options.git_sync = True
501 options.upload = 'gs://upload/' 501 options.upload = 'gs://upload/'
502 options.binhost_base_url = options.upload 502 options.binhost_base_url = options.upload
503 options.prepend_version = True 503 options.prepend_version = True
504 options.filters = True 504 options.filters = True
505 options.key = 'PORTAGE_BINHOST' 505 options.key = 'PORTAGE_BINHOST'
506 options.sync_binhost_conf = True 506 options.sync_binhost_conf = True
507 options.acl_file = None
507 self.mox.StubOutWithMock(prebuilt, 'ParseOptions') 508 self.mox.StubOutWithMock(prebuilt, 'ParseOptions')
508 prebuilt.ParseOptions().AndReturn(options) 509 prebuilt.ParseOptions().AndReturn(options)
509 self.mox.StubOutWithMock(prebuilt, 'LoadPrivateFilters') 510 self.mox.StubOutWithMock(prebuilt, 'LoadPrivateFilters')
510 prebuilt.LoadPrivateFilters(options.build_path) 511 prebuilt.LoadPrivateFilters(options.build_path)
511 self.mox.StubOutWithMock(prebuilt, 'GrabRemotePackageIndex') 512 self.mox.StubOutWithMock(prebuilt, 'GrabRemotePackageIndex')
512 prebuilt.GrabRemotePackageIndex(old_binhost).AndReturn(True) 513 prebuilt.GrabRemotePackageIndex(old_binhost).AndReturn(True)
513 self.mox.StubOutWithMock(prebuilt.PrebuiltUploader, '__init__') 514 self.mox.StubOutWithMock(prebuilt.PrebuiltUploader, '__init__')
514 prebuilt.PrebuiltUploader.__init__(options.upload, 'private', 515 prebuilt.PrebuiltUploader.__init__(options.upload, 'private',
515 options.binhost_base_url, mox.IgnoreArg()) 516 options.upload, mox.IgnoreArg())
516 self.mox.StubOutWithMock(prebuilt.PrebuiltUploader, '_SyncHostPrebuilts') 517 self.mox.StubOutWithMock(prebuilt.PrebuiltUploader, '_SyncHostPrebuilts')
517 prebuilt.PrebuiltUploader._SyncHostPrebuilts(options.build_path, 518 prebuilt.PrebuiltUploader._SyncHostPrebuilts(options.build_path,
518 mox.IgnoreArg(), options.key, options.git_sync, 519 mox.IgnoreArg(), options.key, options.git_sync,
519 options.sync_binhost_conf) 520 options.sync_binhost_conf)
520 self.mox.StubOutWithMock(prebuilt.PrebuiltUploader, '_SyncBoardPrebuilts') 521 self.mox.StubOutWithMock(prebuilt.PrebuiltUploader, '_SyncBoardPrebuilts')
521 prebuilt.PrebuiltUploader._SyncBoardPrebuilts(options.board, 522 prebuilt.PrebuiltUploader._SyncBoardPrebuilts(options.board,
522 options.build_path, mox.IgnoreArg(), options.key, options.git_sync, 523 options.build_path, mox.IgnoreArg(), options.key, options.git_sync,
523 options.sync_binhost_conf) 524 options.sync_binhost_conf)
524 self.mox.ReplayAll() 525 self.mox.ReplayAll()
525 prebuilt.main() 526 prebuilt.main()
526 527
527 if __name__ == '__main__': 528 if __name__ == '__main__':
528 unittest.main() 529 unittest.main()
OLDNEW
« buildbot/prebuilt.py ('K') | « buildbot/prebuilt.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698