diff options
-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.""" |