my @args = (
$self->valgrind,
- '--log-fd=' . fileno($vwtr),
$self->tool->args($self),
@supp_args,
+ $self->parser->args($self, $vwtr),
$self->command->args($self),
);
close $vwtr or $self->_croak("close(\$vwtr): $!");
- $self->tool->parse($self, $vrdr);
+ $self->parser->parse($self, $vrdr);
$self->{exit_code} = (waitpid($pid, 0) == $pid) ? $? >> 8 : 255;
my @members;
BEGIN {
- @members = qw/action tool command/;
+ @members = qw/action tool command parser/;
for (@members) {
eval "sub $_ { \@_ <= 1 ? \$_[0]->{$_} : (\$_[0]->{$_} = \$_[1]) }";
die if $@;
my %args = @_;
- for (@members) {
+ for (qw/action tool command/) {
my $base = 'Test::Valgrind::' . ucfirst;
my $value = $args{$_};
$self->_croak("Invalid $_") unless Scalar::Util::blessed($value)
delete @{$self}{qw/last_status exit_code/};
$self->tool->start($self);
+ $self->parser($self->tool->parser_class->new)->start($self);
$self->action->start($self);
return;
sub abort {
my $self = shift;
+
$self->action->abort($self, @_);
}
return unless defined $report;
- $report = $self->command->filter($self, $report);
- return unless defined $report;
+ for my $handler (qw/tool command/) {
+ $report = $self->$handler->filter($self, $report);
+ return unless defined $report;
+ }
$self->action->report($self, $report);
}
my ($self) = @_;
my $action = $self->action;
+
$action->finish($self);
+ $self->parser->finish($self);
$self->tool->finish($self);
my $status = $action->status($self);
=head1 SEE ALSO
-L<Test::Valgrind>, L<Test::Valgrind::Action>, L<Test::Valgrind::Tool>, L<Test::Valgrind::Command>.
+L<Test::Valgrind>, L<Test::Valgrind::Action>, L<Test::Valgrind::Command>, L<Test::Valgrind::Tool>, L<Test::Valgrind::Parser>.
L<version>, L<File::HomeDir>.