my @supp_args;
if ($self->do_suppressions) {
push @supp_args, '--gen-suppressions=all';
- } else {
- my @supps;
- if (not $self->no_def_supp) {
- my $def_supp = $self->def_supp_file;
- if (defined $def_supp and not -e $def_supp) {
- $self->report(Test::Valgrind::Report->new_diag(
- "Generating suppressions..."
- ));
- require Test::Valgrind::Suppressions;
- Test::Valgrind::Suppressions->generate(
- tool => $self->tool,
- command => $self->command,
- target => $def_supp,
- );
- $self->_croak('Couldn\'t generate suppressions') unless -e $def_supp;
- $self->report(Test::Valgrind::Report->new_diag(
- "Suppressions for this perl stored in $def_supp"
- ));
- }
+ } elsif (not $self->no_def_supp) {
+ my $def_supp = $self->def_supp_file;
+ if (defined $def_supp and not -e $def_supp) {
+ $self->report(Test::Valgrind::Report->new_diag(
+ "Generating suppressions..."
+ ));
+ require Test::Valgrind::Suppressions;
+ Test::Valgrind::Suppressions->generate(
+ tool => $self->tool,
+ command => $self->command,
+ target => $def_supp,
+ );
+ $self->_croak('Couldn\'t generate suppressions') unless -e $def_supp;
+ $self->report(Test::Valgrind::Report->new_diag(
+ "Suppressions for this perl stored in $def_supp"
+ ));
}
push @supp_args, '--suppressions=' . $_ for $self->suppressions;
}