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

Side by Side Diff: build_tools/tests/update_manifest_test.py

Issue 8566045: Updated update_manifest.py to push manifest files to server (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: merge Created 9 years, 1 month 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 | « build_tools/sdk_tools/update_manifest.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/python2.6 1 #!/usr/bin/python2.6
2 # 2 #
3 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 3 # Copyright (c) 2011 The Native Client 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 """Unit tests for update_manifest.py.""" 7 """Unit tests for update_manifest.py."""
8 8
9 __author__ = 'mball@google.com (Matt Ball)' 9 __author__ = 'mball@google.com (Matt Ball)'
10 10
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 '--bundle-revision', '0', 287 '--bundle-revision', '0',
288 '--description', 'test bundle for update_manifest unit tests', 288 '--description', 'test bundle for update_manifest unit tests',
289 '--bundle-name', 'test_bundle', 289 '--bundle-name', 'test_bundle',
290 '--stability', 'dev', 290 '--stability', 'dev',
291 '--recommended', 'no', 291 '--recommended', 'no',
292 '--manifest-file', temp_filename] 292 '--manifest-file', temp_filename]
293 update_manifest.main(argv) 293 update_manifest.main(argv)
294 finally: 294 finally:
295 RemoveFile(temp_filename) 295 RemoveFile(temp_filename)
296 296
297 def testPush(self):
298 '''Test whether the push function does the right thing'''
299 options = FakeOptions()
300 argv = ['-g', options.gsutil, 'push']
301 update_manifest.main(argv)
302
297 def testHandleSDKTools(self): 303 def testHandleSDKTools(self):
298 '''Test the handling of the sdk_tools bundle''' 304 '''Test the handling of the sdk_tools bundle'''
299 options = FakeOptions() 305 options = FakeOptions()
300 options.bundle_name = 'sdk_tools' 306 options.bundle_name = 'sdk_tools'
301 options.upload = True 307 options.upload = True
302 options.bundle_version = 0 308 options.bundle_version = 0
303 self.assertRaises( 309 self.assertRaises(
304 update_manifest.Error, 310 update_manifest.Error,
305 update_manifest.UpdateSDKManifestFile(options).HandleBundles) 311 update_manifest.UpdateSDKManifestFile(options).HandleBundles)
306 options.bundle_version = None 312 options.bundle_version = None
(...skipping 25 matching lines...) Expand all
332 338
333 339
334 def main(): 340 def main():
335 suite = unittest.TestLoader().loadTestsFromTestCase(TestUpdateManifest) 341 suite = unittest.TestLoader().loadTestsFromTestCase(TestUpdateManifest)
336 result = unittest.TextTestRunner(verbosity=2).run(suite) 342 result = unittest.TextTestRunner(verbosity=2).run(suite)
337 343
338 return int(not result.wasSuccessful()) 344 return int(not result.wasSuccessful())
339 345
340 if __name__ == '__main__': 346 if __name__ == '__main__':
341 sys.exit(main()) 347 sys.exit(main())
OLDNEW
« no previous file with comments | « build_tools/sdk_tools/update_manifest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698