Reviewers: Jakob,

Message:
This just renames any old test data directory after a new archive is downloaded.
There are several reasons why to do it this way:
* Preserve data directories the user might have around.
* On buildbots any untracked directory will be deleted before the next run by
gclient.
* It is hard(TM) to recursively remove directories on Windows buildbots, better
let gclient do it.

If you have a more elegant solution, let me know. But I want to keep the
"DownloadData" routine as simple as possible. So I am hesitant to adding a stamp
file or something like that.

Description:
Fix test262 harness to purge old data directory.

[email protected]


Please review this at https://chromiumcodereview.appspot.com/10097006/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M test/test262/testcfg.py


Index: test/test262/testcfg.py
diff --git a/test/test262/testcfg.py b/test/test262/testcfg.py
index fc03c4d02e56f833487506be9f3c8a18a719ce0a..2c9bf06f1428741a935406c769bf085f16f5a21c 100644
--- a/test/test262/testcfg.py
+++ b/test/test262/testcfg.py
@@ -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()


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to