| OLD | NEW |
| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 test_record["negative"]["type"]): | 225 test_record["negative"]["type"]): |
| 226 return True | 226 return True |
| 227 return "FAILED!" in output.stdout | 227 return "FAILED!" in output.stdout |
| 228 | 228 |
| 229 def HasUnexpectedOutput(self, testcase): | 229 def HasUnexpectedOutput(self, testcase): |
| 230 outcome = self.GetOutcome(testcase) | 230 outcome = self.GetOutcome(testcase) |
| 231 if (statusfile.FAIL_SLOPPY in testcase.outcomes and | 231 if (statusfile.FAIL_SLOPPY in testcase.outcomes and |
| 232 "--use-strict" not in testcase.flags): | 232 "--use-strict" not in testcase.flags): |
| 233 return outcome != statusfile.FAIL | 233 return outcome != statusfile.FAIL |
| 234 return not outcome in ([outcome for outcome in testcase.outcomes | 234 return not outcome in ([outcome for outcome in testcase.outcomes |
| 235 if not outcome.startswith('--')] | 235 if not outcome.startswith('--') |
| 236 and outcome != statusfile.FAIL_SLOPPY] |
| 236 or [statusfile.PASS]) | 237 or [statusfile.PASS]) |
| 237 | 238 |
| 238 def PrepareSources(self): | 239 def PrepareSources(self): |
| 239 # The archive is created only on swarming. Local checkouts have the | 240 # The archive is created only on swarming. Local checkouts have the |
| 240 # data folder. | 241 # data folder. |
| 241 if (os.path.exists(ARCHIVE) and | 242 if (os.path.exists(ARCHIVE) and |
| 242 # Check for a JS file from the archive if we need to unpack. Some other | 243 # Check for a JS file from the archive if we need to unpack. Some other |
| 243 # files from the archive unfortunately exist due to a bug in the | 244 # files from the archive unfortunately exist due to a bug in the |
| 244 # isolate_processor. | 245 # isolate_processor. |
| 245 # TODO(machenbach): Migrate this to GN to avoid using the faulty | 246 # TODO(machenbach): Migrate this to GN to avoid using the faulty |
| 246 # isolate_processor: http://crbug.com/669910 | 247 # isolate_processor: http://crbug.com/669910 |
| 247 not os.path.exists(os.path.join(DATA, 'test', 'harness', 'error.js'))): | 248 not os.path.exists(os.path.join(DATA, 'test', 'harness', 'error.js'))): |
| 248 print "Extracting archive..." | 249 print "Extracting archive..." |
| 249 tar = tarfile.open(ARCHIVE) | 250 tar = tarfile.open(ARCHIVE) |
| 250 tar.extractall(path=os.path.dirname(ARCHIVE)) | 251 tar.extractall(path=os.path.dirname(ARCHIVE)) |
| 251 tar.close() | 252 tar.close() |
| 252 | 253 |
| 253 | 254 |
| 254 def GetSuite(name, root): | 255 def GetSuite(name, root): |
| 255 return Test262TestSuite(name, root) | 256 return Test262TestSuite(name, root) |
| OLD | NEW |