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 113ec9d01d40b4510c8befe579409fdd7db79660..25c10a08ea16eb2afb0bf55762e427bcca15d1e4 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 |
@@ -222,6 +222,28 @@ class TestCommands(SdkToolsTestCase): |
output = self._Run(['update', 'foobar']) |
self.assertTrue('unknown bundle' in output) |
+ def testUpdateRecommended(self): |
+ """The update command should update only recommended bundles when run |
+ without args. |
+ """ |
+ bundle = self._AddDummyBundle(self.manifest, 'pepper_26') |
+ bundle.recommended = 'yes' |
+ self._WriteManifest() |
+ output = self._Run(['update']) |
+ self.assertTrue(os.path.exists( |
+ os.path.join(self.basedir, 'nacl_sdk', 'pepper_26', 'dummy.txt'))) |
+ |
+ def testUpdateCanary(self): |
+ """The update command should create the correct directory name for repath'd |
+ bundles. |
+ """ |
+ bundle = self._AddDummyBundle(self.manifest, 'pepper_26') |
+ bundle.name = 'pepper_canary' |
+ self._WriteManifest() |
+ output = self._Run(['update']) |
+ self.assertTrue(os.path.exists( |
+ os.path.join(self.basedir, 'nacl_sdk', 'pepper_canary', 'dummy.txt'))) |
+ |
if __name__ == '__main__': |
- sys.exit(unittest.main()) |
+ unittest.main() |