diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-10 16:52:24 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-10 16:52:24 +0000 |
commit | dd93d377d98d124351e81bcb3e240f0be689476d (patch) | |
tree | ac0a649bf7c4d68b725ef5ac13498e0e1338db7c /native_client_sdk | |
parent | 472f95ed65083a54004c78d2dc519c1bb936fcb1 (diff) | |
download | chromium_src-dd93d377d98d124351e81bcb3e240f0be689476d.zip chromium_src-dd93d377d98d124351e81bcb3e240f0be689476d.tar.gz chromium_src-dd93d377d98d124351e81bcb3e240f0be689476d.tar.bz2 |
[NaCl SDK] "naclsdk info" command should display multiple archives.
The command previously only displayed one archive -- now it displays all
archives (including for other hosts).
BUG=247739
R=sbc@chromium.org
Review URL: https://codereview.chromium.org/16662002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rw-r--r-- | native_client_sdk/src/build_tools/sdk_tools/command/info.py | 12 | ||||
-rwxr-xr-x | native_client_sdk/src/build_tools/tests/sdktools_commands_test.py | 12 |
2 files changed, 17 insertions, 7 deletions
diff --git a/native_client_sdk/src/build_tools/sdk_tools/command/info.py b/native_client_sdk/src/build_tools/sdk_tools/command/info.py index c412ddd..6bf310f 100644 --- a/native_client_sdk/src/build_tools/sdk_tools/command/info.py +++ b/native_client_sdk/src/build_tools/sdk_tools/command/info.py @@ -23,13 +23,11 @@ def Info(manifest, bundle_names): for key in sorted(bundle.iterkeys()): value = bundle[key] if key == manifest_util.ARCHIVES_KEY: - archive = bundle.GetHostOSArchive() - print ' Archive:' - if archive: - for archive_key in sorted(archive.iterkeys()): - print ' %s: %s' % (archive_key, archive[archive_key]) - else: - print ' No archives for this host.' + for archive in bundle.GetArchives(): + print ' Archive:' + if archive: + for archive_key in sorted(archive.iterkeys()): + print ' %s: %s' % (archive_key, archive[archive_key]) elif key not in (manifest_util.ARCHIVES_KEY, manifest_util.NAME_KEY): print ' %s: %s' % (key, value) print 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 2fae323..8abef29 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 @@ -99,6 +99,18 @@ class TestCommands(SdkToolsTestCase): self.assertTrue('pepper_24' in output) self.assertFalse(re.search(r'[uU]nknown', output)) + def testInfoMultipleArchives(self): + """The info command should display multiple archives.""" + bundle = self._AddDummyBundle(self.manifest, 'pepper_26') + archive2 = self._MakeDummyArchive('pepper_26', tarname='pepper_26_more', + filename='dummy2.txt') + archive2.host_os = 'all' + bundle.AddArchive(archive2) + self._WriteManifest() + output = self._Run(['info', 'pepper_26']) + self.assertTrue('pepper_26' in output) + self.assertTrue('pepper_26_more' in output) + def testListBasic(self): """The list command should display basic information about remote bundles.""" |