Reviewers: Jakob,
Description:
When upgrading the test data twice, don't bail out because of an existing
backup
BUG=none
[email protected]
LOG=n
Please review this at https://codereview.chromium.org/183853004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+7, -1 lines):
M test/mozilla/testcfg.py
M test/test262/testcfg.py
Index: test/mozilla/testcfg.py
diff --git a/test/mozilla/testcfg.py b/test/mozilla/testcfg.py
index
775a239f07d186655d8efcb09f1ecd118324f01b..e0558267a57d9c0f0b3f4eba035ead1711db10b8
100644
--- a/test/mozilla/testcfg.py
+++ b/test/mozilla/testcfg.py
@@ -132,8 +132,11 @@ class MozillaTestSuite(testsuite.TestSuite):
# If we have a local archive file with the test data, extract it.
directory_name = "data"
+ directory_name_old = "data.old"
if os.path.exists(directory_name):
- os.rename(directory_name, "data.old")
+ if os.path.exists(directory_name_old):
+ shutil.rmtree(directory_old_name)
+ os.rename(directory_name, directory_name_old)
archive_file = "downloaded_%s.tar.gz" % MOZILLA_VERSION
if os.path.exists(archive_file):
with tarfile.open(archive_file, "r:gz") as tar:
Index: test/test262/testcfg.py
diff --git a/test/test262/testcfg.py b/test/test262/testcfg.py
index
89f729d9a34a533d8c58e0d1bca40d9e0ad0bf19..d4a7f5684f021a9f5b83a8e228c2d8096b8becb5
100644
--- a/test/test262/testcfg.py
+++ b/test/test262/testcfg.py
@@ -28,6 +28,7 @@
import hashlib
import os
+import shutil
import sys
import tarfile
import urllib
@@ -98,6 +99,8 @@ class Test262TestSuite(testsuite.TestSuite):
print "Downloading test data from %s ..." % archive_url
urllib.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.bz2 ..." % revision
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.