Fix test262 harness to purge old data directory.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 16 Apr 2012 09:05:32 +0000 (09:05 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 16 Apr 2012 09:05:32 +0000 (09:05 +0000)
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10097006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/test262/testcfg.py

index fc03c4d..2c9bf06 100644 (file)
@@ -104,9 +104,12 @@ class Test262TestConfiguration(test.TestConfiguration):
     archive_url = TEST_262_URL % revision
     archive_name = join(self.root, 'test262-%s.tar.bz2' % revision)
     directory_name = join(self.root, 'data')
+    directory_old_name = join(self.root, 'data.old')
     if not exists(archive_name):
       print "Downloading test data from %s ..." % archive_url
       urllib.urlretrieve(archive_url, archive_name)
+      if exists(directory_name):
+        os.rename(directory_name, directory_old_name)
     if not exists(directory_name):
       print "Extracting test262-%s.tar.bz2 ..." % revision
       md5 = hashlib.md5()