From: Vincent Pit Date: Sun, 29 Jun 2008 15:58:40 +0000 (+0200) Subject: Importing Test-Valgrind-0.03.tar.gz X-Git-Tag: v0.03^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=commitdiff_plain;h=d685884acaef843ed4ce04a48d7da565d52280fb Importing Test-Valgrind-0.03.tar.gz --- diff --git a/Changes b/Changes index 57c82a4..95ebd37 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Test-Valgrind +0.03 2008-04-21 15:35 UTC + + Fix : Include the mock Suppressions.pm rather than an empty file. + 0.02 2008-04-21 15:25 UTC + Add : Test::Valgrind now depends on Perl::Destruct::Level. This is needed for non-debugging perls because we can't set their diff --git a/META.yml b/META.yml index 884e5f0..b6e5716 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Test-Valgrind -version: 0.02 +version: 0.03 abstract: Test Perl code through valgrind. license: perl author: diff --git a/README b/README index 8ece675..55a7247 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Test::Valgrind - Test Perl code through valgrind. VERSION - Version 0.02 + Version 0.03 SYNOPSIS use Test::More; diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index b4ce022..506e11f 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -17,11 +17,11 @@ Test::Valgrind - Test Perl code through valgrind. =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 SYNOPSIS diff --git a/lib/Test/Valgrind/Suppressions.pm b/lib/Test/Valgrind/Suppressions.pm index e69de29..8b2a1e9 100644 --- a/lib/Test/Valgrind/Suppressions.pm +++ b/lib/Test/Valgrind/Suppressions.pm @@ -0,0 +1,94 @@ +package Test::Valgrind::Suppressions; + +use strict; +use warnings; + +=head1 NAME + +Test::Valgrind::Suppressions - Placeholder for architecture-dependant perl suppressions. + +=head1 VERSION + +Version 0.03 + +=cut + +our $VERSION = '0.03'; + +=head1 DESCRIPTION + +L needs suppressions so that perl's errors aren't reported. However, these suppressions depend widely on the architecture, perl's version and the features it has been build with (e.g. threads). The goal of this module is hence to be installed together with the suppression file generated when the Test-Valgrind distribution was built, and to handle back to L the path to the suppression file. + +=head1 FUNCTIONS + +=head2 C + +Returns the path to the suppression file that applies to the current running perl, or C when no such file is available. + +=cut + +sub supp_path { + my $pkg = __PACKAGE__; + $pkg =~ s!::!/!g; + $pkg .= '.pm'; + return if not $INC{$pkg}; + my $supp = $INC{$pkg}; + $supp =~ s![^/]*$!perlTestValgrind.supp!; + return (-f $supp) ? $supp : undef; +} + +=head1 CONSTANTS + +=head2 C + +The path to the valgrind binary from which the suppressions were generated. + +=cut + +use constant VG_PATH => undef; + +=head1 EXPORT + +This module exports the L function and the L constants only on demand, either by giving their name explicitely or by the C<:funcs>, C<:consts> or C<:all> tags. + +=cut + +use base qw/Exporter/; + +our @EXPORT = (); +our %EXPORT_TAGS = ( + 'funcs' => [ qw/supp_path/ ], + 'consts' => [ qw/VG_PATH/ ] +); +our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; +$EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; + +=head1 SEE ALSO + +L. + +=head1 AUTHOR + +Vincent Pit, C<< >>, L. + +You can contact me by mail or on #perl @ FreeNode (vincent or Prof_Vince). + +=head1 BUGS + +Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. + +=head1 SUPPORT + +You can find documentation for this module with the perldoc command. + + perldoc Test::Valgrind::Suppressions + +=head1 COPYRIGHT & LICENSE + +Copyright 2008 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. + +=cut + +1; # End of Test::Valgrind::Suppressions diff --git a/lib/Test/Valgrind/Suppressions.tpl b/lib/Test/Valgrind/Suppressions.tpl index f3f7636..8b2a1e9 100644 --- a/lib/Test/Valgrind/Suppressions.tpl +++ b/lib/Test/Valgrind/Suppressions.tpl @@ -9,11 +9,11 @@ Test::Valgrind::Suppressions - Placeholder for architecture-dependant perl suppr =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 DESCRIPTION