Index: test/test262-es6/testcfg.py |
diff --git a/test/test262-es6/testcfg.py b/test/test262-es6/testcfg.py |
index 0519dc0e0ecb7cd17ff6be40e2a65eb40ac7a25b..36f760b7e582bc0ce7e40e4a8d22324470b0038c 100644 |
--- a/test/test262-es6/testcfg.py |
+++ b/test/test262-es6/testcfg.py |
@@ -131,6 +131,16 @@ class Test262TestSuite(testsuite.TestSuite): |
archive_name = os.path.join(self.root, "tc39-test262-%s.tar.gz" % revision) |
directory_name = os.path.join(self.root, "data") |
directory_old_name = os.path.join(self.root, "data.old") |
+ |
+ # 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 archive_name not in archive_files: |
+ 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) |