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

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

Issue 2824853003: 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(1)
35 actual_lines = output.stdout.splitlines(1)
36 output.stdout = ''.join(difflib.unified_diff(expected_lines, actual_lines) )
37 return True
38 return False
39
40 def shell(self):
41 return "mkgrokdump"
42
43 def GetSuite(name, root):
44 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