Chromium Code Reviews| Index: test/simdjs/testcfg.py |
| diff --git a/test/simdjs/testcfg.py b/test/simdjs/testcfg.py |
| index c0390afd65ea2f38da8f4bc1191863bcd38bd91e..313da726662c9f23436d74fc753abe9a801dcc64 100644 |
| --- a/test/simdjs/testcfg.py |
| +++ b/test/simdjs/testcfg.py |
| @@ -14,10 +14,9 @@ from testrunner.local import testsuite |
| from testrunner.local import utils |
| from testrunner.objects import testcase |
| -SIMDJS_ARCHIVE_REVISION = "07e2713e0c9ea19feb0732d5bd84770c87310d79" |
| -SIMDJS_ARCHIVE_MD5 = "cf6bddf99f18800b68e782054268ee3c" |
| -SIMDJS_URL = ( |
| - "https://github.com/johnmccutchan/ecmascript_simd/archive/%s.tar.gz") |
| +SIMDJS_ARCHIVE_REVISION = "631f1ebf046e60e67138c21bdafdf8624903d87b" |
|
bbudge
2015/07/20 23:39:40
I'll have to update this since the current polyfil
|
| +SIMDJS_ARCHIVE_MD5 = "9bdd1a7acb8090e90c84a97f5575a67a" |
| +SIMDJS_URL = ("https://github.com/tc39/ecmascript_simd/archive/%s.tar.gz") |
| SIMDJS_SUITE_PATH = ["data", "src"] |
| @@ -65,10 +64,30 @@ class SimdJsTestSuite(testsuite.TestSuite): |
| def DownloadData(self): |
| revision = SIMDJS_ARCHIVE_REVISION |
| archive_url = SIMDJS_URL % revision |
| + |
|
bbudge
2015/07/20 23:39:40
Incorporating some changes from Brad Nelson's CL t
bbudge
2015/07/21 00:37:21
Brad's CL: https://codereview.chromium.org/1240453
|
| 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): |
| + 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 +115,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) |