| Test-Valgrind documentation | view source | Contained in the Test-Valgrind distribution. |
new search_dirs => \@search_dirs, valgrind => [ $valgrind | \@valgrind ], min_version => $min_version, no_def_supp => $no_def_supp, extra_supps => \@extra_suppsvalgrindversionno_def_suppextra_suppsrun action => $action, tool => $tool, command => $commandactiontoolparsercommanddo_suppressionsparser_classreport_classdef_supp_filesuppressionsstartabort $msgreport $reportfinishstatusTest::Valgrind::Session - Test::Valgrind session object.
Version 1.12
This class supervises the execution of the valgrind process.
It also acts as a dispatcher between the different components.
new search_dirs => \@search_dirs, valgrind => [ $valgrind | \@valgrind ], min_version => $min_version, no_def_supp => $no_def_supp, extra_supps => \@extra_suppsThe package constructor, which takes several options :
@search_dirs will have valgrind appended to create a list of candidates for the valgrind executable.
PATH environment variable. $valgrind is passed as the value to 'valgrind', it will be the only candidate.
@search_dirs will then be ignored.
\@valgrind is passed, its values will be prepended to the list of the candidates resulting from @search_dirs. $min_version specifies the minimal valgrind version required.
The constructor will croak if it's not able to find an adequate valgrind from the supplied candidates list and search path.
$no_def_supp is false, valgrind won't read the default suppression file associated with the tool and the command.
$extra_supps is a reference to an array of optional suppression files that will be passed to valgrind.
valgrindThe path to the selected valgrind executable.
versionThe version object associated to the selected valgrind.
no_def_suppRead-only accessor for the no_def_supp option.
extra_suppsRead-only accessor for the extra_supps option.
run action => $action, tool => $tool, command => $commandRuns the command $command through valgrind with the tool $tool, which will report to the action $action.
If the command is a Test::Valgrind::Command::Aggregate object, the action and the tool will be initialized once before running all the aggregated commands.
actionRead-only accessor for the action associated to the current run.
toolRead-only accessor for the tool associated to the current run.
parserRead-only accessor for the parser associated to the current tool.
commandRead-only accessor for the command associated to the current run.
do_suppressionsForwards to ->action->do_suppressions.
parser_classCalls ->tool->parser_class with the current session object as the unique argument.
report_classCalls ->tool->report_class with the current session object as the unique argument.
def_supp_fileReturns an absolute path to the default suppression file associated to the current session.
undef will be returned as soon as any of ->command->suppressions_tag or ->tool->suppressions_tag are also undef.
Otherwise, the file part of the name is builded by joining those two together, and the directory part is roughly File::HomeDir->my_home / .perl / Test-Valgrind / suppressions / $VERSION.
suppressionsReturns the list of all the suppressions that will be passed to valgrind.
Honors no_def_supp and extra_supps.
startStarts the action and tool associated to the current run. It's automatically called at the beginning of run.
abort $msgForwards to ->action->abort after unshifting the session object to the argument list.
report $reportForwards to ->action->report after unshifting the session object to the argument list.
finishFinishes the action and tool associated to the current run. It's automatically called at the end of run.
statusReturns the status code of the last run of the session.
Test::Valgrind, Test::Valgrind::Action, Test::Valgrind::Command, Test::Valgrind::Tool, Test::Valgrind::Parser.
Vincent Pit, <perl at profvince.com>, http://www.profvince.com.
You can contact me by mail or on irc.perl.org (vincent).
Please report any bugs or feature requests to bug-test-valgrind at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind.
I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Test::Valgrind::Session
Copyright 2009 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Test-Valgrind documentation | view source | Contained in the Test-Valgrind distribution. |