1Test::Valgrind::Tool(3)User Contributed Perl DocumentatioTnest::Valgrind::Tool(3)
2
3
4
6 Test::Valgrind::Tool - Base class for Test::Valgrind tools.
7
9 Version 1.19
10
12 This class is the base for Test::Valgrind tools.
13
14 They wrap around "valgrind" tools by parsing its output and sending
15 reports to the parent session whenever an error occurs. They are
16 expected to function both in suppressions generation and in analysis
17 mode.
18
20 "requires_version"
21 my $required_version = $tvt->requires_version;
22
23 The minimum "valgrind" version needed to run this tool. Defaults to
24 3.1.0.
25
26 "new"
27 my $tvt = Test::Valgrind::Tool->new(tool => $tool);
28
29 Creates a new tool object of type $tool by requiring and redispatching
30 the method call to the module named $tool if it contains '::' or to
31 "Test::Valgrind::Tool::$tool" otherwise. The class represented by
32 $tool must inherit this class.
33
34 "new_trainer"
35 my $tvt_train = Test::Valgrind::Tool->new_trainer;
36
37 Creates a new tool object suitable for generating suppressions.
38
39 Defaults to return "undef", which skips suppression generation.
40
41 "parser_class"
42 my $parser_class = $tvt->parser_class($session);
43
44 Returns the class from which the parser for this tool output will be
45 instanciated.
46
47 This method must be implemented when subclassing.
48
49 "report_class"
50 my $report_class = $tvt->report_class($session);
51
52 Returns the class in which suppression reports generated by this tool
53 will be blessed.
54
55 This method must be implemented when subclassing.
56
57 "args"
58 my @args = $tvt->args($session);
59
60 Returns the list of tool-specific arguments that are to be passed to
61 "valgrind". All the suppression arguments are already handled by the
62 session.
63
64 Defaults to the empty list.
65
66 "suppressions_tag"
67 my $tag = $tvt->suppressions_tag($session);
68
69 Returns a identifier that will be used to pick up the right
70 suppressions for running the tool, or "undef" to indicate that no
71 special suppressions are needed.
72
73 This method must be implemented when subclassing.
74
75 "start"
76 $tvt->start($session);
77
78 Called when the $session starts.
79
80 Defaults to set "started" in Test::Valgrind::Component.
81
82 "filter"
83 my $filtered_report = $tvt->filter($session, $report);
84
85 The $session calls this method after receiving a report from the parser
86 and before letting the command filter it. You can either return a
87 mangled $report (which does not need to be a clone of the original) or
88 "undef" if you want the action to ignore it completely.
89
90 Defaults to the identity function.
91
92 "finish"
93 $tvt->finish($session);
94
95 Called when the $session finishes.
96
97 Defaults to clear "started" in Test::Valgrind::Component.
98
100 Test::Valgrind, Test::Valgrind::Component, Test::Valgrind::Session.
101
103 Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
104
105 You can contact me by mail or on "irc.perl.org" (vincent).
106
108 Please report any bugs or feature requests to "bug-test-valgrind at
109 rt.cpan.org", or through the web interface at
110 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind>. I will
111 be notified, and then you'll automatically be notified of progress on
112 your bug as I make changes.
113
115 You can find documentation for this module with the perldoc command.
116
117 perldoc Test::Valgrind::Tool
118
120 Copyright 2009,2010,2011,2013,2015,2016 Vincent Pit, all rights
121 reserved.
122
123 This program is free software; you can redistribute it and/or modify it
124 under the same terms as Perl itself.
125
126
127
128perl v5.36.0 2023-01-20 Test::Valgrind::Tool(3)