OLD | NEW |
(Empty) | |
| 1 # Copyright 2017 the V8 project authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 |
| 7 from testrunner.local import testsuite |
| 8 from testrunner.objects import testcase |
| 9 |
| 10 |
| 11 class MkGrokdump(testsuite.TestSuite): |
| 12 |
| 13 def __init__(self, name, root): |
| 14 super(MkGrokdump, self).__init__(name, root) |
| 15 |
| 16 def ListTests(self, context): |
| 17 test = testcase.TestCase(self, self.shell()) |
| 18 return [test] |
| 19 |
| 20 def GetFlagsForTestCase(self, testcase, context): |
| 21 return [] |
| 22 |
| 23 def IsFailureOutput(self, testcase): |
| 24 output = testcase.output |
| 25 v8_path = os.path.dirname(os.path.dirname(os.path.abspath(self.root))) |
| 26 expected_path = os.path.join(v8_path, "tools", "v8heapconst.py") |
| 27 with open(expected_path) as f: |
| 28 expected = f.read() |
| 29 if expected != output.stdout: |
| 30 output.stdout = "Please update tools/v8heapconst.py with the output of mkg
rokdump!" |
| 31 return True |
| 32 return False |
| 33 |
| 34 def shell(self): |
| 35 return "mkgrokdump" |
| 36 |
| 37 def GetSuite(name, root): |
| 38 return MkGrokdump(name, root) |
OLD | NEW |