diff options
author | mball@google.com <mball@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-06 18:22:56 +0000 |
---|---|---|
committer | mball@google.com <mball@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-06 18:22:56 +0000 |
commit | f705df8866c55e9d8b76df0feebb7ba47c688c37 (patch) | |
tree | e8c3a2dc36187ba24752157f37a85b816f61cac2 /native_client_sdk | |
parent | 84df8330d252faf3ac552ba40364d973ee19af81 (diff) | |
download | chromium_src-f705df8866c55e9d8b76df0feebb7ba47c688c37.zip chromium_src-f705df8866c55e9d8b76df0feebb7ba47c688c37.tar.gz chromium_src-f705df8866c55e9d8b76df0feebb7ba47c688c37.tar.bz2 |
Fixed update_manifest to correctly accept format: pepper -b .. -B .....
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8801030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113234 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-x | native_client_sdk/src/build_tools/sdk_tools/update_manifest.py | 2 | ||||
-rw-r--r-- | native_client_sdk/src/build_tools/tests/naclsdk_manifest_test.json | 134 | ||||
-rw-r--r-- | native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_linux.tgz | bin | 0 -> 138 bytes | |||
-rw-r--r-- | native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_mac.tgz | bin | 0 -> 133 bytes | |||
-rw-r--r-- | native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_win.exe | bin | 0 -> 138 bytes | |||
-rwxr-xr-x | native_client_sdk/src/build_tools/tests/update_manifest_test.py | 17 |
6 files changed, 108 insertions, 45 deletions
diff --git a/native_client_sdk/src/build_tools/sdk_tools/update_manifest.py b/native_client_sdk/src/build_tools/sdk_tools/update_manifest.py index 8d8d0df..d020e0a2 100755 --- a/native_client_sdk/src/build_tools/sdk_tools/update_manifest.py +++ b/native_client_sdk/src/build_tools/sdk_tools/update_manifest.py @@ -272,6 +272,8 @@ class UpdateSDKManifestFile(sdk_update.SDKManifestFile): raise Error('Need to specify a bundle version') if options.bundle_revision is None: raise Error('Need to specify a bundle revision') + if options.bundle_name == 'pepper': + self.options.bundle_name = 'pepper_%s' % options.bundle_version if options.desc is None: options.desc = ('Chrome %s bundle, revision %s' % (options.bundle_version, options.bundle_revision)) diff --git a/native_client_sdk/src/build_tools/tests/naclsdk_manifest_test.json b/native_client_sdk/src/build_tools/tests/naclsdk_manifest_test.json index a1eb57ea..9bf2567 100644 --- a/native_client_sdk/src/build_tools/tests/naclsdk_manifest_test.json +++ b/native_client_sdk/src/build_tools/tests/naclsdk_manifest_test.json @@ -1,89 +1,141 @@ { - "manifest_version": 1, "bundles": [ { - "name": "sdk_tools", - "revision": 1, - "version": 2, "description": "Native Client SDK Tools, revision 1", "stability": "stable", "recommended": "yes", + "version": 2, "archives": [ { + "url": "nacl_sdk_linux_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, "host_os": "linux", - "size": 30018483, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_sdk_linux_1.tgz" + "size": 30018483 }, { + "url": "nacl_sdk_mac_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, "host_os": "mac", - "size": 30227408, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_sdk_mac_1.tgz" + "size": 30227408 }, { + "url": "nacl_sdk_win_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, "host_os": "win", - "size": 36440315, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_sdk_win_1.tgz" + "size": 36440315 } - ] + ], + "revision": 1, + "name": "sdk_tools" }, { - "name": "test_1", - "version": 1, - "revision": 2, "description": "Test Bundle version 1", "stability": "stable", "recommended": "yes", + "version": 1, "archives": [ { + "url": "nacl_linux_pepper_14_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, "host_os": "linux", - "size": 30018483, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_linux_pepper_14_1.tgz" + "size": 30018483 }, { + "url": "nacl_mac_pepper_14_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, "host_os": "mac", - "size": 30227408, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_mac_pepper_14_1.tgz" + "size": 30227408 }, { + "url": "nacl_win_pepper_14_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, "host_os": "win", - "size": 36440315, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_win_pepper_14_1.tgz" + "size": 36440315 } - ] + ], + "revision": 2, + "name": "test_1" }, { - "name": "test_2", - "version": 1, - "revision": 2, "description": "Test Bundle version 2", "stability": "stable", "recommended": "yes", + "version": 1, "archives": [ { + "url": "nacl_linux_pepper_15_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, "host_os": "linux", - "size": 30018483, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_linux_pepper_15_1.tgz" + "size": 30018483 }, { + "url": "nacl_mac_pepper_15_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, "host_os": "mac", - "size": 30227408, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_mac_pepper_15_1.tgz" + "size": 30227408 + }, + { + "url": "nacl_win_pepper_15_1.tgz", + "checksum": { + "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" + }, + "host_os": "win", + "size": 36440315 + } + ], + "revision": 2, + "name": "test_2" + }, + { + "description": "Chrome 1 bundle, revision 0", + "stability": "dev", + "recommended": "no", + "version": 1, + "archives": [ + { + "url": "file:///usr/local/google/users/mball/wrk/chromium/src/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_mac.tgz", + "checksum": { + "sha1": "db66a0bba015f481995648ed022fcd78c9da0539" + }, + "host_os": "mac", + "size": 133 + }, + { + "url": "file:///usr/local/google/users/mball/wrk/chromium/src/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_linux.tgz", + "checksum": { + "sha1": "7137917e08e8403e8a92354e69d5ff649a022c39" + }, + "host_os": "linux", + "size": 138 }, { + "url": "file:///usr/local/google/users/mball/wrk/chromium/src/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_win.exe", + "checksum": { + "sha1": "fd5cecf2c5cb990829fe42a14fb8e1efbb35bf8f" + }, "host_os": "win", - "size": 36440315, - "checksum": { "sha1": "638bf0020c6f013ebef420d03fd7bb28593047b4" }, - "url": "nacl_win_pepper_15_1.tgz" + "size": 138 } - ] + ], + "revision": 0, + "name": "pepper_1" } - ] + ], + "manifest_version": 1 } diff --git a/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_linux.tgz b/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_linux.tgz Binary files differnew file mode 100644 index 0000000..f652373 --- /dev/null +++ b/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_linux.tgz diff --git a/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_mac.tgz b/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_mac.tgz Binary files differnew file mode 100644 index 0000000..779f854 --- /dev/null +++ b/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_mac.tgz diff --git a/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_win.exe b/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_win.exe Binary files differnew file mode 100644 index 0000000..5a4f120 --- /dev/null +++ b/native_client_sdk/src/build_tools/tests/pepper_1_0/naclsdk_win.exe diff --git a/native_client_sdk/src/build_tools/tests/update_manifest_test.py b/native_client_sdk/src/build_tools/tests/update_manifest_test.py index b84d345..1022323 100755 --- a/native_client_sdk/src/build_tools/tests/update_manifest_test.py +++ b/native_client_sdk/src/build_tools/tests/update_manifest_test.py @@ -15,6 +15,7 @@ import sys import tempfile import threading import unittest +import urllib import urlparse from build_tools.sdk_tools import sdk_update @@ -73,7 +74,7 @@ class FakeOptions(object): self.manifest_file = os.path.join(TEST_DIR, 'naclsdk_manifest_test.json') self.manifest_version = None self.recommended = None - self.root_url = 'http://localhost/test_url' + self.root_url = 'file://%s' % urllib.pathname2url(TEST_DIR) self.stability = None self.upload = False self.win_arch_url = None @@ -318,16 +319,24 @@ class TestUpdateManifest(unittest.TestCase): self.assertRaises( update_manifest.Error, update_manifest.UpdateSDKManifestFile(options).HandleBundles) + options.bundle_name = 'pepper' options.bundle_version = 1 options.bundle_revision = None self.assertRaises( update_manifest.Error, update_manifest.UpdateSDKManifestFile(options).HandleBundles) + options.bundle_name = 'pepper' options.bundle_revision = 0 - update_manifest.UpdateSDKManifestFile(options).HandleBundles() + manifest_object = update_manifest.UpdateSDKManifestFile(options) + manifest_object.HandleBundles() + manifest_object.UpdateWithOptions() + + options = FakeOptions() options.bundle_name = 'pepper_1' - options.bundle_version = None - update_manifest.UpdateSDKManifestFile(options).HandleBundles() + options.bundle_revision = 0 + manifest_object = update_manifest.UpdateSDKManifestFile(options) + manifest_object.HandleBundles() + manifest_object.UpdateWithOptions() def main(): |