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

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

Issue 8889029: Merged in other half of NaCl SDK's r1387 change to update_manifest.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk Created 9 years 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 | « native_client_sdk/src/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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 The Native Client 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 """Unit tests for update_manifest.py.""" 6 """Unit tests for update_manifest.py."""
7 7
8 __author__ = 'mball@google.com (Matt Ball)' 8 __author__ = 'mball@google.com (Matt Ball)'
9 9
10 import errno 10 import errno
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 '--bundle-revision', '0', 288 '--bundle-revision', '0',
289 '--description', 'test bundle for update_manifest unit tests', 289 '--description', 'test bundle for update_manifest unit tests',
290 '--bundle-name', 'test_bundle', 290 '--bundle-name', 'test_bundle',
291 '--stability', 'dev', 291 '--stability', 'dev',
292 '--recommended', 'no', 292 '--recommended', 'no',
293 '--manifest-file', temp_filename] 293 '--manifest-file', temp_filename]
294 update_manifest.main(argv) 294 update_manifest.main(argv)
295 finally: 295 finally:
296 RemoveFile(temp_filename) 296 RemoveFile(temp_filename)
297 297
298 def testPush(self):
299 '''Test whether the push function does the right thing'''
300 options = FakeOptions()
301 argv = ['-g', options.gsutil, 'push']
302 update_manifest.main(argv)
303
298 def testHandleSDKTools(self): 304 def testHandleSDKTools(self):
299 '''Test the handling of the sdk_tools bundle''' 305 '''Test the handling of the sdk_tools bundle'''
300 options = FakeOptions() 306 options = FakeOptions()
301 options.bundle_name = 'sdk_tools' 307 options.bundle_name = 'sdk_tools'
302 options.upload = True 308 options.upload = True
303 options.bundle_version = 0 309 options.bundle_version = 0
304 self.assertRaises( 310 self.assertRaises(
305 update_manifest.Error, 311 update_manifest.Error,
306 update_manifest.UpdateSDKManifestFile(options).HandleBundles) 312 update_manifest.UpdateSDKManifestFile(options).HandleBundles)
307 options.bundle_version = None 313 options.bundle_version = None
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 360
355 def main(): 361 def main():
356 suite = unittest.TestLoader().loadTestsFromTestCase(TestUpdateManifest) 362 suite = unittest.TestLoader().loadTestsFromTestCase(TestUpdateManifest)
357 result = unittest.TextTestRunner(verbosity=2).run(suite) 363 result = unittest.TextTestRunner(verbosity=2).run(suite)
358 364
359 return int(not result.wasSuccessful()) 365 return int(not result.wasSuccessful())
360 366
361 367
362 if __name__ == '__main__': 368 if __name__ == '__main__':
363 sys.exit(main()) 369 sys.exit(main())
OLDNEW
« no previous file with comments | « native_client_sdk/src/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