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

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

Issue 1197913002: Test262-es6 test runner should handle sloppy fail better (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix long line Created 5 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
« no previous file with comments | « test/test262-es6/test262-es6.status ('k') | tools/testrunner/local/statusfile.py » ('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 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 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 15 matching lines...) Expand all
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 hashlib 29 import hashlib
30 import os 30 import os
31 import shutil 31 import shutil
32 import sys 32 import sys
33 import tarfile 33 import tarfile
34 import imp 34 import imp
35 35
36 from testrunner.local import statusfile
36 from testrunner.local import testsuite 37 from testrunner.local import testsuite
37 from testrunner.local import utils 38 from testrunner.local import utils
38 from testrunner.objects import testcase 39 from testrunner.objects import testcase
39 40
40 # The revision hash needs to be 7 characters? 41 # The revision hash needs to be 7 characters?
41 TEST_262_ARCHIVE_REVISION = "488c0a7" # This is the 2015-06-11 revision. 42 TEST_262_ARCHIVE_REVISION = "488c0a7" # This is the 2015-06-11 revision.
42 TEST_262_ARCHIVE_MD5 = "f7d4ec9be81f1e1f10fd8a61c71baead" 43 TEST_262_ARCHIVE_MD5 = "f7d4ec9be81f1e1f10fd8a61c71baead"
43 TEST_262_URL = "https://github.com/tc39/test262/tarball/%s" 44 TEST_262_URL = "https://github.com/tc39/test262/tarball/%s"
44 TEST_262_HARNESS_FILES = ["sta.js", "assert.js"] 45 TEST_262_HARNESS_FILES = ["sta.js", "assert.js"]
45 46
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 130
130 def IsNegativeTest(self, testcase): 131 def IsNegativeTest(self, testcase):
131 test_record = self.GetTestRecord(testcase) 132 test_record = self.GetTestRecord(testcase)
132 return "negative" in test_record 133 return "negative" in test_record
133 134
134 def IsFailureOutput(self, output, testpath): 135 def IsFailureOutput(self, output, testpath):
135 if output.exit_code != 0: 136 if output.exit_code != 0:
136 return True 137 return True
137 return "FAILED!" in output.stdout 138 return "FAILED!" in output.stdout
138 139
140 def HasUnexpectedOutput(self, testcase):
141 outcome = self.GetOutcome(testcase)
142 if (statusfile.FAIL_SLOPPY in testcase.outcomes and
143 "--use-strict" not in testcase.flags):
144 return outcome != statusfile.FAIL
145 return not outcome in (testcase.outcomes or [statusfile.PASS])
146
139 def DownloadData(self): 147 def DownloadData(self):
140 revision = TEST_262_ARCHIVE_REVISION 148 revision = TEST_262_ARCHIVE_REVISION
141 archive_url = TEST_262_URL % revision 149 archive_url = TEST_262_URL % revision
142 archive_name = os.path.join(self.root, "tc39-test262-%s.tar.gz" % revision) 150 archive_name = os.path.join(self.root, "tc39-test262-%s.tar.gz" % revision)
143 directory_name = os.path.join(self.root, "data") 151 directory_name = os.path.join(self.root, "data")
144 directory_old_name = os.path.join(self.root, "data.old") 152 directory_old_name = os.path.join(self.root, "data.old")
145 153
146 # Clobber if the test is in an outdated state, i.e. if there are any other 154 # Clobber if the test is in an outdated state, i.e. if there are any other
147 # archive files present. 155 # archive files present.
148 archive_files = [f for f in os.listdir(self.root) 156 archive_files = [f for f in os.listdir(self.root)
(...skipping 27 matching lines...) Expand all
176 # Magic incantation to allow longer path names on Windows. 184 # Magic incantation to allow longer path names on Windows.
177 archive.extractall(u"\\\\?\\%s" % self.root) 185 archive.extractall(u"\\\\?\\%s" % self.root)
178 else: 186 else:
179 archive.extractall(self.root) 187 archive.extractall(self.root)
180 os.rename(os.path.join(self.root, "tc39-test262-%s" % revision), 188 os.rename(os.path.join(self.root, "tc39-test262-%s" % revision),
181 directory_name) 189 directory_name)
182 190
183 191
184 def GetSuite(name, root): 192 def GetSuite(name, root):
185 return Test262TestSuite(name, root) 193 return Test262TestSuite(name, root)
OLDNEW
« no previous file with comments | « test/test262-es6/test262-es6.status ('k') | tools/testrunner/local/statusfile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698