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

Side by Side Diff: appengine/findit/crash/test/fracas_parser_test.py

Issue 1980203002: [Findit] Filter inline function path frames (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase and fix nits. Created 4 years, 7 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import textwrap 5 import textwrap
6 6
7 from common.dependency import Dependency 7 from common.dependency import Dependency
8 from crash.callstack import StackFrame, CallStack 8 from crash.callstack import StackFrame, CallStack
9 from crash.fracas_parser import FracasParser 9 from crash.fracas_parser import FracasParser
10 from crash.stacktrace import Stacktrace 10 from crash.stacktrace import Stacktrace
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 parser = FracasParser() 63 parser = FracasParser()
64 deps = {'src/': Dependency('src/', 'https://repo', '1')} 64 deps = {'src/': Dependency('src/', 'https://repo', '1')}
65 stacktrace_string = textwrap.dedent( 65 stacktrace_string = textwrap.dedent(
66 """ 66 """
67 CRASHED [EXC @ 0x66] 67 CRASHED [EXC @ 0x66]
68 #0 0x7fee in a::b::c(p* &d) src/f0.cc:177 68 #0 0x7fee in a::b::c(p* &d) src/f0.cc:177
69 #1 0x4b6e in a::b::d(a* c) src/f1.cc:227:2 69 #1 0x4b6e in a::b::d(a* c) src/f1.cc:227:2
70 70
71 CRASHED [EXC @ 0x508] 71 CRASHED [EXC @ 0x508]
72 #0 0x8fee in e::f::g(p* &d) src/f.cc:20:2 72 #0 0x8fee in e::f::g(p* &d) src/f.cc:20:2
73 #0 0x1fae in h::i::j(p* &d) src/ff.cc:9:1 73 #1 0x1fae in h::i::j(p* &d) src/ff.cc:9:1
74 """ 74 """
75 ) 75 )
76 76
77 stacktrace = parser.Parse(stacktrace_string, deps) 77 stacktrace = parser.Parse(stacktrace_string, deps)
78 78
79 expected_callstack0 = CallStack(0) 79 expected_callstack0 = CallStack(0)
80 expected_callstack0.extend( 80 expected_callstack0.extend(
81 [StackFrame(0, 'src/', '', 'a::b::c(p* &d)', 'f0.cc', [177]), 81 [StackFrame(0, 'src/', '', 'a::b::c(p* &d)', 'f0.cc', [177]),
82 StackFrame(1, 'src/', '', 'a::b::d(a* c)', 'f1.cc', [227, 228, 229])]) 82 StackFrame(1, 'src/', '', 'a::b::d(a* c)', 'f1.cc', [227, 228, 229])])
83 83
84 expected_callstack1 = CallStack(0) 84 expected_callstack1 = CallStack(0)
85 expected_callstack1.extend( 85 expected_callstack1.extend(
86 [StackFrame(0, 'src/', '', 'e::f::g(p* &d)', 'f.cc', [20, 21, 22]), 86 [StackFrame(0, 'src/', '', 'e::f::g(p* &d)', 'f.cc', [20, 21, 22]),
87 StackFrame(0, 'src/', '', 'h::i::j(p* &d)', 'ff.cc', [9, 10])]) 87 StackFrame(1, 'src/', '', 'h::i::j(p* &d)', 'ff.cc', [9, 10])])
88 88
89 expected_stacktrace = Stacktrace() 89 expected_stacktrace = Stacktrace()
90 expected_stacktrace.extend([expected_callstack0, expected_callstack1]) 90 expected_stacktrace.extend([expected_callstack0, expected_callstack1])
91 91
92 self._VerifyTwoStacktracesEqual(stacktrace, expected_stacktrace) 92 self._VerifyTwoStacktracesEqual(stacktrace, expected_stacktrace)
OLDNEW
« no previous file with comments | « appengine/findit/crash/test/callstack_filters_test.py ('k') | appengine/findit/crash/test/stacktrace_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698