summaryrefslogtreecommitdiff
path: root/deps/v8/test/simdjs/testcfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/simdjs/testcfg.py')
-rw-r--r--deps/v8/test/simdjs/testcfg.py48
1 files changed, 43 insertions, 5 deletions
diff --git a/deps/v8/test/simdjs/testcfg.py b/deps/v8/test/simdjs/testcfg.py
index c0390afd65..cbe880d149 100644
--- a/deps/v8/test/simdjs/testcfg.py
+++ b/deps/v8/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 = "99ef44bd4f22acd203c01e524131bc7f2a7eab68"
+SIMDJS_ARCHIVE_MD5 = "1428773887924fa5a784bf0843615740"
+SIMDJS_URL = ("https://github.com/tc39/ecmascript_simd/archive/%s.tar.gz")
SIMDJS_SUITE_PATH = ["data", "src"]
@@ -65,10 +64,44 @@ class SimdJsTestSuite(testsuite.TestSuite):
def DownloadData(self):
revision = SIMDJS_ARCHIVE_REVISION
archive_url = SIMDJS_URL % revision
+
+ archive_prefix = "ecmascript_simd-"
archive_name = os.path.join(
- self.root, "ecmascript_simd-%s.tar.gz" % revision)
+ self.root, "%s%s.tar.gz" % (archive_prefix, 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):
+ print "Clobbering %s because CHECK_OUT_VERSION is out of date" % (
+ archive_name)
+ os.remove(archive_name)
+
+ # Clobber if the test is in an outdated state, i.e. if there are any other
+ # archive files present.
+ archive_files = [f for f in os.listdir(self.root)
+ if f.startswith(archive_prefix)]
+ if (len(archive_files) > 1 or
+ os.path.basename(archive_name) not in archive_files):
+ print "Clobber outdated test archives ..."
+ for f in archive_files:
+ print "Removing %s" % f
+ os.remove(os.path.join(self.root, f))
+
if not os.path.exists(archive_name):
print "Downloading test data from %s ..." % archive_url
utils.URLRetrieve(archive_url, archive_name)
@@ -96,6 +129,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)