summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authorbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-15 18:31:03 +0000
committerbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-15 18:31:03 +0000
commit5c82408ae4cd2977e7aa34e9d7ac06cefada1c3a (patch)
tree5ca70b19e51f4c19d9032d9ddd1275bd2fd344bd /native_client_sdk
parent26b41ae5e2bff749d61925b06b68fce1933c42e6 (diff)
downloadchromium_src-5c82408ae4cd2977e7aa34e9d7ac06cefada1c3a.zip
chromium_src-5c82408ae4cd2977e7aa34e9d7ac06cefada1c3a.tar.gz
chromium_src-5c82408ae4cd2977e7aa34e9d7ac06cefada1c3a.tar.bz2
[NaCl SDK] Fixed bug in update_nacl_manifest after omahaproxy change.
The omahaproxy URL /revision?version=... no longer works, it redirects instead. Change the path to /revision.json?version=... and parse the JSON result. BUG=none TBR=noelallen@chromium.org NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11414012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167966 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-xnative_client_sdk/src/build_tools/tests/test_update_nacl_manifest.py15
-rwxr-xr-xnative_client_sdk/src/build_tools/update_nacl_manifest.py6
2 files changed, 19 insertions, 2 deletions
diff --git a/native_client_sdk/src/build_tools/tests/test_update_nacl_manifest.py b/native_client_sdk/src/build_tools/tests/test_update_nacl_manifest.py
index f2031ce..e69f307 100755
--- a/native_client_sdk/src/build_tools/tests/test_update_nacl_manifest.py
+++ b/native_client_sdk/src/build_tools/tests/test_update_nacl_manifest.py
@@ -569,5 +569,20 @@ class TestUpdateVitals(unittest.TestCase):
self.assertEqual(archive['checksum']['sha1'], self.sha1)
+class TestRealDelegate(unittest.TestCase):
+ def setUp(self):
+ self.delegate = update_nacl_manifest.RealDelegate()
+
+ def testGetTrunkRevision(self):
+ revision_dict = {
+ '21.0.1180.80': '151582',
+ '23.0.1271.89': '167132',
+ '24.0.1305.4': '164971',
+ }
+ for version, revision in revision_dict.iteritems():
+ self.assertEqual('trunk.%s' % revision,
+ self.delegate.GetTrunkRevision(version))
+
+
if __name__ == '__main__':
sys.exit(unittest.main())
diff --git a/native_client_sdk/src/build_tools/update_nacl_manifest.py b/native_client_sdk/src/build_tools/update_nacl_manifest.py
index c8fb442..154f827 100755
--- a/native_client_sdk/src/build_tools/update_nacl_manifest.py
+++ b/native_client_sdk/src/build_tools/update_nacl_manifest.py
@@ -14,6 +14,7 @@ import buildbot_common
import csv
import cStringIO
import email
+import json
import manifest_util
import optparse
import os
@@ -193,8 +194,9 @@ class RealDelegate(Delegate):
def GetTrunkRevision(self, version):
"""See Delegate.GetTrunkRevision"""
- url = 'http://omahaproxy.appspot.com/revision?version=%s' % (version,)
- return 'trunk.%s' % (urllib2.urlopen(url).read(),)
+ url = 'http://omahaproxy.appspot.com/revision.json?version=%s' % (version,)
+ data = json.loads(urllib2.urlopen(url).read())
+ return 'trunk.%s' % int(data['chromium_revision'])
def GsUtil_ls(self, url):
"""See Delegate.GsUtil_ls"""