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

Unified Diff: native_client_sdk/src/build_tools/tests/sdktools_commands_test.py

Issue 12470004: [NaCl SDK] Fix bug in "naclsdk update", updating recommended bundles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/tests/sdktools_commands_test.py
diff --git a/native_client_sdk/src/build_tools/tests/sdktools_commands_test.py b/native_client_sdk/src/build_tools/tests/sdktools_commands_test.py
index 5a6c53be85778f50d7e9374b3b653bd864a4b4cb..15933e1111599999d23ddb16c7c3fb8a671e66fe 100755
--- a/native_client_sdk/src/build_tools/tests/sdktools_commands_test.py
+++ b/native_client_sdk/src/build_tools/tests/sdktools_commands_test.py
@@ -227,10 +227,18 @@ class TestCommands(SdkToolsTestCase):
"""The update command should update only recommended bundles when run
without args.
"""
- bundle = self._AddDummyBundle(self.manifest, 'pepper_26')
- bundle.recommended = 'yes'
+ bundle_25 = self._AddDummyBundle(self.manifest, 'pepper_25')
+ bundle_25.recommended = 'no'
+ bundle_26 = self._AddDummyBundle(self.manifest, 'pepper_26')
+ bundle_26.recommended = 'yes'
+
self._WriteManifest()
output = self._Run(['update'])
+
+ # Should not try to update sdk_tools (even though it is recommended)
+ self.assertTrue('Ignoring manual update request.' not in output)
+ self.assertFalse(os.path.exists(
+ os.path.join(self.basedir, 'nacl_sdk', 'pepper_25')))
self.assertTrue(os.path.exists(
os.path.join(self.basedir, 'nacl_sdk', 'pepper_26', 'dummy.txt')))
@@ -241,7 +249,7 @@ class TestCommands(SdkToolsTestCase):
bundle = self._AddDummyBundle(self.manifest, 'pepper_26')
bundle.name = 'pepper_canary'
self._WriteManifest()
- output = self._Run(['update'])
+ output = self._Run(['update', 'pepper_canary'])
self.assertTrue(os.path.exists(
os.path.join(self.basedir, 'nacl_sdk', 'pepper_canary', 'dummy.txt')))
@@ -255,7 +263,7 @@ class TestCommands(SdkToolsTestCase):
archive2.host_os = 'all'
bundle.AddArchive(archive2)
self._WriteManifest()
- output = self._Run(['update'])
+ output = self._Run(['update', 'pepper_26'])
self.assertTrue(os.path.exists(
os.path.join(self.basedir, 'nacl_sdk', 'pepper_26', 'dummy.txt')))
self.assertTrue(os.path.exists(
« 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