summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
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"""