| Index: test/test262/testcfg.py
|
| diff --git a/test/test262/testcfg.py b/test/test262/testcfg.py
|
| index 87a4f61775de7f96385308becf9e9f931023dc61..0319264e84927ca673f1db8954554d54a909a76f 100644
|
| --- a/test/test262/testcfg.py
|
| +++ b/test/test262/testcfg.py
|
| @@ -39,10 +39,6 @@ from testrunner.local import testsuite
|
| from testrunner.local import utils
|
| from testrunner.objects import testcase
|
|
|
| -# The revision hash needs to be 7 characters?
|
| -TEST_262_ARCHIVE_REVISION = "26e6fd7" # This is the 2015-10-1 revision.
|
| -TEST_262_ARCHIVE_MD5 = "36fdd27f026f396234132fb5afdcfffb"
|
| -TEST_262_URL = "https://github.com/tc39/test262/tarball/%s"
|
| TEST_262_HARNESS_FILES = ["sta.js", "assert.js"]
|
|
|
| TEST_262_SUITE_PATH = ["data", "test"]
|
| @@ -196,49 +192,20 @@ class Test262TestSuite(testsuite.TestSuite):
|
| return not outcome in (testcase.outcomes or [statusfile.PASS])
|
|
|
| def DownloadData(self):
|
| - revision = TEST_262_ARCHIVE_REVISION
|
| - archive_url = TEST_262_URL % revision
|
| - archive_name = os.path.join(self.root, "tc39-test262-%s.tar.gz" % revision)
|
| - directory_name = os.path.join(self.root, "data")
|
| + print "Test262 download is deprecated. It's part of DEPS."
|
| +
|
| + # Clean up old directories and archive files.
|
| directory_old_name = os.path.join(self.root, "data.old")
|
| + if os.path.exists(directory_old_name):
|
| + shutil.rmtree(directory_old_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("tc39-test262-")]
|
| - if (len(archive_files) > 1 or
|
| - os.path.basename(archive_name) not in archive_files):
|
| + if len(archive_files) > 0:
|
| print "Clobber outdated test archives ..."
|
| for f in archive_files:
|
| 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)
|
| - if os.path.exists(directory_name):
|
| - if os.path.exists(directory_old_name):
|
| - shutil.rmtree(directory_old_name)
|
| - os.rename(directory_name, directory_old_name)
|
| - if not os.path.exists(directory_name):
|
| - print "Extracting test262-%s.tar.gz ..." % revision
|
| - md5 = hashlib.md5()
|
| - with open(archive_name, "rb") as f:
|
| - for chunk in iter(lambda: f.read(8192), ""):
|
| - md5.update(chunk)
|
| - print "MD5 hash is %s" % md5.hexdigest()
|
| - if md5.hexdigest() != TEST_262_ARCHIVE_MD5:
|
| - os.remove(archive_name)
|
| - print "MD5 expected %s" % TEST_262_ARCHIVE_MD5
|
| - raise Exception("MD5 hash mismatch of test data file")
|
| - archive = tarfile.open(archive_name, "r:gz")
|
| - if sys.platform in ("win32", "cygwin"):
|
| - # Magic incantation to allow longer path names on Windows.
|
| - archive.extractall(u"\\\\?\\%s" % self.root)
|
| - else:
|
| - archive.extractall(self.root)
|
| - os.rename(os.path.join(self.root, "tc39-test262-%s" % revision),
|
| - directory_name)
|
| -
|
|
|
| def GetSuite(name, root):
|
| return Test262TestSuite(name, root)
|
|
|