Lines Matching refs:stack
19 # an ellipsis wildcards zero or more functions in a stack.
104 """This class represents a single stack trace suppression.
109 stack: The lines comprising the stack trace for the suppression.
113 def __init__(self, description, type, stack, defined_at, regex):
116 description, type, stack, regex: same as class attributes
121 self.stack = stack
140 if not self.stack:
198 def __init__(self, description, type, stack, defined_at):
201 for line in stack:
240 description, type, stack, defined_at, regex)
244 lines = [self.description, self.type] + self.stack
389 def __init__(self, name, report_type, instr, stack, defined_at):
409 for line in stack:
423 regex += '(.*\n)*' # Match anything left in the stack.
425 return super(DrMemorySuppression, self).__init__(name, report_type, stack,
435 text += "\n".join(self.stack)
489 stack = []
498 # Unrecognized prefix indicates start of stack trace.
505 ('Unexpected stack frame pattern at line %d\n' +
514 stack.append(line)
516 if len(stack) == 0: # In case we hit EOF or blank without any stack frames.
517 raise SuppressionError('Suppression "%s" has no stack frames, ends at %d'
519 if stack[-1] == ELLIPSIS:
524 DrMemorySuppression(name, report_type, instr, stack, defined_at))
533 stack trace that ends in a blank line.
538 def TestStack(stack, positive, negative, suppression_parser=None):
539 """A helper function for SelfTest() that checks a single stack.
542 stack: the stack to match the suppressions.
543 positive: the list of suppressions that must match the given stack.
552 assert parsed[0].Match(stack.split("\n")), (
553 "Suppression:\n%s\ndidn't match stack:\n%s" % (supp, stack))
556 assert not parsed[0].Match(stack.split("\n")), (
557 "Suppression:\n%s\ndid match stack:\n%s" % (supp, stack))
913 TestFailPresubmit(forgot_stack, 'has no stack frames',
930 TestFailPresubmit(bad_stack_frame, 'Unexpected stack frame pattern',