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

Unified Diff: test/simdjs/testcfg.py

Issue 1240453003: Make simdjs tests redownload on a revision change. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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: test/simdjs/testcfg.py
diff --git a/test/simdjs/testcfg.py b/test/simdjs/testcfg.py
index c0390afd65ea2f38da8f4bc1191863bcd38bd91e..29012fcc67b80ef8d128527f260f3ed3c4002d1b 100644
--- a/test/simdjs/testcfg.py
+++ b/test/simdjs/testcfg.py
@@ -65,10 +65,30 @@ class SimdJsTestSuite(testsuite.TestSuite):
def DownloadData(self):
revision = SIMDJS_ARCHIVE_REVISION
archive_url = SIMDJS_URL % revision
+
archive_name = os.path.join(
self.root, "ecmascript_simd-%s.tar.gz" % revision)
directory_name = os.path.join(self.root, "data")
directory_old_name = os.path.join(self.root, "data.old")
+ versionfile = os.path.join(self.root, "CHECKED_OUT_VERSION")
+
+ checked_out_version = None
+ checked_out_url = None
+ checked_out_revision = None
+ if os.path.exists(versionfile):
+ with open(versionfile) as f:
+ try:
+ (checked_out_version,
+ checked_out_url,
+ checked_out_revision) = f.read().splitlines()
+ except ValueError:
+ pass
+ if (checked_out_version != SIMDJS_ARCHIVE_MD5 or
+ checked_out_url != archive_url or
+ checked_out_revision != revision):
Michael Achenbach 2015/07/21 06:58:17 Please add a print statement here that logs what's
bradn 2015/07/21 18:37:19 Done.
+ if os.path.exists(archive_name):
+ os.remove(archive_name)
+
if not os.path.exists(archive_name):
print "Downloading test data from %s ..." % archive_url
utils.URLRetrieve(archive_url, archive_name)
@@ -96,6 +116,11 @@ class SimdJsTestSuite(testsuite.TestSuite):
os.rename(os.path.join(self.root, "ecmascript_simd-%s" % revision),
directory_name)
+ with open(versionfile, "w") as f:
+ f.write(SIMDJS_ARCHIVE_MD5 + '\n')
+ f.write(archive_url + '\n')
+ f.write(revision + '\n')
+
def GetSuite(name, root):
return SimdJsTestSuite(name, root)
« 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