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

Side by Side Diff: test/mkgrokdump/testcfg.py

Issue 2826743003: Revert of Introduce mkgrokdump to update tools/v8heapconst.py. (Closed)
Patch Set: Created 3 years, 8 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/mkgrokdump/mkgrokdump.status ('k') | tools/run-tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 import difflib
7
8 from testrunner.local import testsuite
9 from testrunner.objects import testcase
10
11
12 class MkGrokdump(testsuite.TestSuite):
13
14 def __init__(self, name, root):
15 super(MkGrokdump, self).__init__(name, root)
16
17 def ListTests(self, context):
18 test = testcase.TestCase(self, self.shell())
19 return [test]
20
21 def GetFlagsForTestCase(self, testcase, context):
22 return []
23
24 def IsFailureOutput(self, testcase):
25 output = testcase.output
26 v8_path = os.path.dirname(os.path.dirname(os.path.abspath(self.root)))
27 expected_path = os.path.join(v8_path, "tools", "v8heapconst.py")
28 with open(expected_path) as f:
29 expected = f.read()
30 if expected != output.stdout:
31 if "generated from a non-shipping build" in output.stdout:
32 return False
33 assert "generated from a shipping build" in output.stdout
34 expected_lines = expected.splitlines()
35 actual_lines = output.stdout.splitlines()
36 output.stdout = "%s differs from mkgrokdump output:\n\n" % expected_path
37 output.stdout += '\n'.join(difflib.unified_diff(expected_lines, actual_lin es))
38 return True
39 return False
40
41 def shell(self):
42 return "mkgrokdump"
43
44 def GetSuite(name, root):
45 return MkGrokdump(name, root)
OLDNEW
« no previous file with comments | « test/mkgrokdump/mkgrokdump.status ('k') | tools/run-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698