OLD | NEW |
1 # Copyright 2008 the V8 project authors. All rights reserved. | 1 # Copyright 2008 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 | 28 |
29 import os | 29 import os |
30 import shutil | 30 import shutil |
31 import subprocess | 31 import subprocess |
32 import tarfile | 32 import tarfile |
33 | 33 |
34 from testrunner.local import testsuite | 34 from testrunner.local import testsuite |
35 from testrunner.objects import testcase | 35 from testrunner.objects import testcase |
36 | 36 |
37 | 37 SVN_SERVER = ( |
38 MOZILLA_VERSION = "2010-06-29" | 38 "svn://svn.chromium.org/chrome/trunk/deps/third_party/mozilla-tests") |
| 39 MOZILLA_VERSION = "51236" |
39 | 40 |
40 | 41 |
41 EXCLUDED = ["CVS"] | 42 EXCLUDED = ["CVS", ".svn"] |
42 | 43 |
43 | 44 |
44 FRAMEWORK = """ | 45 FRAMEWORK = """ |
45 browser.js | 46 browser.js |
46 shell.js | 47 shell.js |
47 jsref.js | 48 jsref.js |
48 template.js | 49 template.js |
49 """.split() | 50 """.split() |
50 | 51 |
51 | 52 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 os.rename(directory_name, directory_name_old) | 141 os.rename(directory_name, directory_name_old) |
141 archive_file = "downloaded_%s.tar.gz" % MOZILLA_VERSION | 142 archive_file = "downloaded_%s.tar.gz" % MOZILLA_VERSION |
142 if os.path.exists(archive_file): | 143 if os.path.exists(archive_file): |
143 with tarfile.open(archive_file, "r:gz") as tar: | 144 with tarfile.open(archive_file, "r:gz") as tar: |
144 tar.extractall() | 145 tar.extractall() |
145 with open(versionfile, "w") as f: | 146 with open(versionfile, "w") as f: |
146 f.write(MOZILLA_VERSION) | 147 f.write(MOZILLA_VERSION) |
147 os.chdir(old_cwd) | 148 os.chdir(old_cwd) |
148 return | 149 return |
149 | 150 |
150 # No cached copy. Check out via CVS, and pack as .tar.gz for later use. | 151 # No cached copy. Check out via SVN, and pack as .tar.gz for later use. |
151 command = ("cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" | 152 command = ("svn co -r %s %s mozilla/js/tests" % |
152 " co -D %s mozilla/js/tests" % MOZILLA_VERSION) | 153 (MOZILLA_VERSION, SVN_SERVER)) |
153 code = subprocess.call(command, shell=True) | 154 code = subprocess.call(command, shell=True) |
154 if code != 0: | 155 if code != 0: |
155 os.chdir(old_cwd) | 156 os.chdir(old_cwd) |
156 raise Exception("Error checking out Mozilla test suite!") | 157 raise Exception("Error checking out Mozilla test suite!") |
157 os.rename(os.path.join("mozilla", "js", "tests"), directory_name) | 158 os.rename(os.path.join("mozilla", "js", "tests"), directory_name) |
158 shutil.rmtree("mozilla") | 159 shutil.rmtree("mozilla") |
159 with tarfile.open(archive_file, "w:gz") as tar: | 160 with tarfile.open(archive_file, "w:gz") as tar: |
160 tar.add("data") | 161 tar.add("data") |
161 with open(versionfile, "w") as f: | 162 with open(versionfile, "w") as f: |
162 f.write(MOZILLA_VERSION) | 163 f.write(MOZILLA_VERSION) |
163 os.chdir(old_cwd) | 164 os.chdir(old_cwd) |
164 | 165 |
165 | 166 |
166 def GetSuite(name, root): | 167 def GetSuite(name, root): |
167 return MozillaTestSuite(name, root) | 168 return MozillaTestSuite(name, root) |
OLD | NEW |