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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 filtered.append(t) | 249 filtered.append(t) |
250 break | 250 break |
251 self.tests = filtered | 251 self.tests = filtered |
252 | 252 |
253 def GetFlagsForTestCase(self, testcase, context): | 253 def GetFlagsForTestCase(self, testcase, context): |
254 raise NotImplementedError | 254 raise NotImplementedError |
255 | 255 |
256 def GetSourceForTest(self, testcase): | 256 def GetSourceForTest(self, testcase): |
257 return "(no source available)" | 257 return "(no source available)" |
258 | 258 |
259 def IsFailureOutput(self, output, testpath): | 259 def IsFailureOutput(self, testcase): |
260 return output.exit_code != 0 | 260 return testcase.output.exit_code != 0 |
261 | 261 |
262 def IsNegativeTest(self, testcase): | 262 def IsNegativeTest(self, testcase): |
263 return False | 263 return False |
264 | 264 |
265 def HasFailed(self, testcase): | 265 def HasFailed(self, testcase): |
266 execution_failed = self.IsFailureOutput(testcase.output, testcase.path) | 266 execution_failed = self.IsFailureOutput(testcase) |
267 if self.IsNegativeTest(testcase): | 267 if self.IsNegativeTest(testcase): |
268 return not execution_failed | 268 return not execution_failed |
269 else: | 269 else: |
270 return execution_failed | 270 return execution_failed |
271 | 271 |
272 def GetOutcome(self, testcase): | 272 def GetOutcome(self, testcase): |
273 if testcase.output.HasCrashed(): | 273 if testcase.output.HasCrashed(): |
274 return statusfile.CRASH | 274 return statusfile.CRASH |
275 elif testcase.output.HasTimedOut(): | 275 elif testcase.output.HasTimedOut(): |
276 return statusfile.TIMEOUT | 276 return statusfile.TIMEOUT |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 return (testcase.flags + ["--gtest_filter=" + testcase.path] + | 331 return (testcase.flags + ["--gtest_filter=" + testcase.path] + |
332 ["--gtest_random_seed=%s" % context.random_seed] + | 332 ["--gtest_random_seed=%s" % context.random_seed] + |
333 ["--gtest_print_time=0"] + | 333 ["--gtest_print_time=0"] + |
334 context.mode_flags) | 334 context.mode_flags) |
335 | 335 |
336 def _VariantGeneratorFactory(self): | 336 def _VariantGeneratorFactory(self): |
337 return StandardVariantGenerator | 337 return StandardVariantGenerator |
338 | 338 |
339 def shell(self): | 339 def shell(self): |
340 return self.name | 340 return self.name |
OLD | NEW |