Chromium Code Reviews| Index: test/v8heapconst/testcfg.py |
| diff --git a/test/v8heapconst/testcfg.py b/test/v8heapconst/testcfg.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fc63183ee21435585f7b762f414d13f8a24ec159 |
| --- /dev/null |
| +++ b/test/v8heapconst/testcfg.py |
| @@ -0,0 +1,38 @@ |
| +# Copyright 2017 the V8 project authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
|
Michael Achenbach
2017/04/11 09:45:54
THis suite requires .isolate file and linkage to i
|
| +import os |
| + |
| +from testrunner.local import testsuite |
| +from testrunner.objects import testcase |
| + |
| + |
| +class V8HeapConst(testsuite.TestSuite): |
|
Michael Starzinger
2017/04/11 09:42:38
How would you feel about calling this test suite (
Yang
2017/04/11 09:57:20
Done.
|
| + |
| + def __init__(self, name, root): |
| + super(V8HeapConst, self).__init__(name, root) |
| + |
| + def ListTests(self, context): |
| + test = testcase.TestCase(self, self.shell()) |
| + return [test] |
| + |
| + def GetFlagsForTestCase(self, testcase, context): |
| + return [] |
| + |
| + def IsFailureOutput(self, testcase): |
| + output = testcase.output |
| + v8_path = os.path.dirname(os.path.dirname(os.path.abspath(self.root))) |
| + expected_path = os.path.join(v8_path, "tools", "v8heapconst.py") |
| + with open(expected_path) as f: |
| + expected = f.read() |
| + if expected != output.stdout: |
| + output.stdout = "Please update tools/v8heapconst.py with the output of mkgrokdump!" |
| + return True |
| + return False |
| + |
| + def shell(self): |
| + return "mkgrokdump" |
| + |
| +def GetSuite(name, root): |
| + return V8HeapConst(name, root) |