Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: build/find_nacl_irt_revisions.py

Issue 7074003: NaCl: Add script for finding which revisions are OK to use in DEPS Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add some comments Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/find_nacl_irt_revisions.py
diff --git a/build/find_nacl_irt_revisions.py b/build/find_nacl_irt_revisions.py
new file mode 100644
index 0000000000000000000000000000000000000000..3793730d57195d296a773f10844fe90551c99e1c
--- /dev/null
+++ b/build/find_nacl_irt_revisions.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# XXX: this isn't in the standard library
+import httplib2
+
+
+# XXX: share these with download_nacl_irt.py
+archs = ['x86_32', 'x86_64']
+
+base_url = 'http://commondatastorage.googleapis.com/nativeclient-archive2/irt'
+
+
+def UrlExists(url):
+ response, data = httplib2.Http().request(url, 'HEAD')
+ return response.status == 200
+
+
+def Main():
+ rev = 5456 # XXX: should query this from SVN
+ while True:
+ available_archs = []
+ for arch in archs:
+ url = '%s/r%s/irt_%s.nexe' % (base_url, rev, arch)
+ if UrlExists(url):
+ available_archs.append(arch)
+ if available_archs == archs:
+ status = 'complete'
+ else:
+ status = 'incomplete'
+ print rev, status, available_archs
+ rev -= 1
+
+
+if __name__ == '__main__':
+ Main()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698