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

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

Issue 11946002: [NaCl SDK] Fix update issues in sdk_tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 7 years, 11 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 | « native_client_sdk/src/build_tools/sdk_tools/command/update.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) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium 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 os 6 import os
7 import sys 7 import sys
8 import re 8 import re
9 import tarfile 9 import tarfile
10 import tempfile 10 import tempfile
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 # Now update using --force. 215 # Now update using --force.
216 output = self._Run(['update', 'pepper_23', '--force']) 216 output = self._Run(['update', 'pepper_23', '--force'])
217 self.assertTrue('Updating bundle' in output) 217 self.assertTrue('Updating bundle' in output)
218 218
219 def testUpdateUnknownBundles(self): 219 def testUpdateUnknownBundles(self):
220 """The update command should ignore unknown bundles and notify the user.""" 220 """The update command should ignore unknown bundles and notify the user."""
221 self._WriteManifest() 221 self._WriteManifest()
222 output = self._Run(['update', 'foobar']) 222 output = self._Run(['update', 'foobar'])
223 self.assertTrue('unknown bundle' in output) 223 self.assertTrue('unknown bundle' in output)
224 224
225 def testUpdateRecommended(self):
226 """The update command should update only recommended bundles when run
227 without args.
228 """
229 bundle = self._AddDummyBundle(self.manifest, 'pepper_26')
230 bundle.recommended = 'yes'
231 self._WriteManifest()
232 output = self._Run(['update'])
233 self.assertTrue(os.path.exists(
234 os.path.join(self.basedir, 'nacl_sdk', 'pepper_26', 'dummy.txt')))
235
236 def testUpdateCanary(self):
237 """The update command should create the correct directory name for repath'd
238 bundles.
239 """
240 bundle = self._AddDummyBundle(self.manifest, 'pepper_26')
241 bundle.name = 'pepper_canary'
242 self._WriteManifest()
243 output = self._Run(['update'])
244 self.assertTrue(os.path.exists(
245 os.path.join(self.basedir, 'nacl_sdk', 'pepper_canary', 'dummy.txt')))
246
225 247
226 if __name__ == '__main__': 248 if __name__ == '__main__':
227 sys.exit(unittest.main()) 249 unittest.main()
OLDNEW
« no previous file with comments | « native_client_sdk/src/build_tools/sdk_tools/command/update.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698