Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: test/test262/testcfg.py

Issue 10538056: Merged r11546 into 3.9 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.9
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/big-array-literal.js ('k') | tools/check-static-initializers.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2011 the V8 project authors. All rights reserved. 1 # Copyright 2011 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 13 matching lines...) Expand all
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 28
29 import test 29 import test
30 import os 30 import os
31 from os.path import join, exists 31 from os.path import join, exists
32 import urllib 32 import urllib
33 import hashlib 33 import hashlib
34 import sys
34 import tarfile 35 import tarfile
35 36
36 37
37 TEST_262_ARCHIVE_REVISION = '3a890174343c' # This is the r309 revision. 38 TEST_262_ARCHIVE_REVISION = '3a890174343c' # This is the r309 revision.
38 TEST_262_ARCHIVE_MD5 = 'be5d4cfbe69cef70430907b8f3a92b50' 39 TEST_262_ARCHIVE_MD5 = 'be5d4cfbe69cef70430907b8f3a92b50'
39 TEST_262_URL = 'http://hg.ecmascript.org/tests/test262/archive/%s.tar.bz2' 40 TEST_262_URL = 'http://hg.ecmascript.org/tests/test262/archive/%s.tar.bz2'
40 TEST_262_HARNESS = ['sta.js'] 41 TEST_262_HARNESS = ['sta.js']
41 42
42 43
43 class Test262TestCase(test.TestCase): 44 class Test262TestCase(test.TestCase):
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 urllib.urlretrieve(archive_url, archive_name) 111 urllib.urlretrieve(archive_url, archive_name)
111 if not exists(directory_name): 112 if not exists(directory_name):
112 print "Extracting test262-%s.tar.bz2 ..." % revision 113 print "Extracting test262-%s.tar.bz2 ..." % revision
113 md5 = hashlib.md5() 114 md5 = hashlib.md5()
114 with open(archive_name,'rb') as f: 115 with open(archive_name,'rb') as f:
115 for chunk in iter(lambda: f.read(8192), ''): 116 for chunk in iter(lambda: f.read(8192), ''):
116 md5.update(chunk) 117 md5.update(chunk)
117 if md5.hexdigest() != TEST_262_ARCHIVE_MD5: 118 if md5.hexdigest() != TEST_262_ARCHIVE_MD5:
118 raise Exception("Hash mismatch of test data file") 119 raise Exception("Hash mismatch of test data file")
119 archive = tarfile.open(archive_name, 'r:bz2') 120 archive = tarfile.open(archive_name, 'r:bz2')
120 archive.extractall(join(self.root)) 121 if sys.platform in ('win32', 'cygwin'):
122 # Magic incantation to allow longer path names on Windows.
123 archive.extractall(u'\\\\?\\%s' % self.root)
124 else:
125 archive.extractall(self.root)
121 if not exists(join(self.root, 'data')): 126 if not exists(join(self.root, 'data')):
122 os.symlink(directory_name, join(self.root, 'data')) 127 os.symlink(directory_name, join(self.root, 'data'))
123 128
124 def GetBuildRequirements(self): 129 def GetBuildRequirements(self):
125 return ['d8'] 130 return ['d8']
126 131
127 def GetTestStatus(self, sections, defs): 132 def GetTestStatus(self, sections, defs):
128 status_file = join(self.root, 'test262.status') 133 status_file = join(self.root, 'test262.status')
129 if exists(status_file): 134 if exists(status_file):
130 test.ReadConfigurationInto(status_file, sections, defs) 135 test.ReadConfigurationInto(status_file, sections, defs)
131 136
132 137
133 def GetConfiguration(context, root): 138 def GetConfiguration(context, root):
134 return Test262TestConfiguration(context, root) 139 return Test262TestConfiguration(context, root)
OLDNEW
« no previous file with comments | « test/mjsunit/big-array-literal.js ('k') | tools/check-static-initializers.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698