1b96321
Name:		perl-Test-Valgrind
1b96321
Summary:	Generate suppressions, analyze and test any command with valgrind
21a1111
Version:	1.19
b17983d
Release:	2%{?dist}
1b96321
Group:		Development/Libraries
1b96321
License:	GPL+ or Artistic
1b96321
URL:		http://search.cpan.org/dist/Test-Valgrind/
1b96321
Source0:	http://search.cpan.org/CPAN/authors/id/V/VP/VPIT/Test-Valgrind-%{version}.tar.gz
1b96321
BuildArch:	noarch
1b96321
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
f1d33bc
# Module Build
f73a6ca
BuildRequires:	coreutils
f73a6ca
BuildRequires:	findutils
f73a6ca
BuildRequires:	gcc
f73a6ca
BuildRequires:	make
f1d33bc
BuildRequires:	perl
f73a6ca
BuildRequires:	perl-devel
8ef7c14
BuildRequires:	perl-generators
f1d33bc
BuildRequires:	perl(ExtUtils::Install)
f1d33bc
BuildRequires:	perl(ExtUtils::MakeMaker)
f1d33bc
# Module Runtime
1b96321
BuildRequires:	perl(base)
1b96321
BuildRequires:	perl(Carp)
f1d33bc
BuildRequires:	perl(Config)
1b96321
BuildRequires:	perl(Digest::MD5)
f1d33bc
BuildRequires:	perl(DynaLoader)
1b96321
BuildRequires:	perl(Env::Sanctify)
501881d
BuildRequires:	perl(ExtUtils::MM)
1b96321
BuildRequires:	perl(Fcntl)
1b96321
BuildRequires:	perl(File::HomeDir) >= 0.86
1b96321
BuildRequires:	perl(File::Path)
1b96321
BuildRequires:	perl(File::Spec)
1b96321
BuildRequires:	perl(File::Temp) >= 0.14
1b96321
BuildRequires:	perl(Filter::Util::Call)
eadd866
BuildRequires:	perl(IO::Select)
eadd866
BuildRequires:	perl(List::Util)
501881d
BuildRequires:	perl(overload)
1b96321
BuildRequires:	perl(Perl::Destruct::Level)
f1d33bc
BuildRequires:	perl(POSIX)
1b96321
BuildRequires:	perl(Scalar::Util)
f1d33bc
BuildRequires:	perl(strict)
1b96321
BuildRequires:	perl(Test::Builder)
f1d33bc
BuildRequires:	perl(warnings)
f1d33bc
BuildRequires:	perl(XML::Twig)
f1d33bc
BuildRequires:	perl(XML::Twig::Elt)
1b96321
BuildRequires:	valgrind >= 3.1.0
f1d33bc
# Test Suite
21a1111
BuildRequires:	perl(File::Temp) >= 0.19
f1d33bc
BuildRequires:	perl(lib)
f1d33bc
BuildRequires:	perl(Test::More)
eadd866
BuildRequires:	perl(Time::HiRes)
f1d33bc
BuildRequires:	perl(XSLoader)
21a1111
# Dependencies
1b96321
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
1b96321
Requires:	perl(Carp)
f1d33bc
Requires:	perl(Config)
1b96321
Requires:	perl(Digest::MD5)
f1d33bc
Requires:	perl(DynaLoader)
1b96321
Requires:	perl(File::HomeDir) >= 0.86
1b96321
Requires:	perl(File::Path)
1b96321
Requires:	perl(File::Temp) >= 0.14
1b96321
Requires:	perl(Filter::Util::Call)
1b96321
Requires:	perl(Perl::Destruct::Level)
1b96321
Requires:	perl(XML::Twig)
f1d33bc
Requires:	perl(XML::Twig::Elt)
1b96321
Requires:	valgrind >= 3.1.0
1b96321
1b96321
%description
1b96321
The Test::Valgrind::* API lets you run Perl code through the memcheck tool of
1b96321
the valgrind memory debugger, to test for memory errors and leaks. The
1b96321
Test::Valgrind module itself is a front-end to this API. If they aren't
1b96321
available yet, it will first generate suppressions for the current perl
1b96321
interpreter and store them in the portable flavor of
1b96321
~/.perl/Test-Valgrind/suppressions/$VERSION. The actual run will then take
1b96321
place, and tests will be passed or failed according to the result of the
1b96321
analysis.
1b96321
1b96321
The complete API is much more versatile than this. By declaring an appropriate
1b96321
Test::Valgrind::Command class, you can run any executable (that is, not only
1b96321
Perl scripts) under valgrind, generate the corresponding suppressions
1b96321
on-the-fly and convert the analysis result to TAP output so that it can be
1b96321
incorporated into your project's test suite. If you're not interested in
1b96321
producing TAP, you can output the results in whatever format you like (for
1b96321
example HTML pages) by defining your own Test::Valgrind::Action class.
1b96321
1b96321
%prep
1b96321
%setup -q -n Test-Valgrind-%{version}
1b96321
501881d
# Avoid doc-file deps
501881d
chmod -c -x samples/map.pl
501881d
1b96321
%build
1b96321
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
1b96321
make %{?_smp_mflags}
1b96321
1b96321
%install
1b96321
rm -rf %{buildroot}
1b96321
make pure_install DESTDIR=%{buildroot}
21a1111
find %{buildroot} -type f -name .packlist -delete
21a1111
find %{buildroot} -type f -name '*.bs' -empty -delete
1b96321
%{_fixperms} %{buildroot}
1b96321
1b96321
# The package is noarch; the XS code included is for testing purposes and is
1b96321
# not part of the module itself
1b96321
if [ "%{perl_vendorarch}" != "%{perl_vendorlib}" ]; then
1b96321
	mkdir -p %{buildroot}%{perl_vendorlib}
1b96321
	mv %{buildroot}%{perl_vendorarch}/* %{buildroot}%{perl_vendorlib}/
1b96321
fi
1b96321
1b96321
# If we have ExtUtils::Install < 1.3702, INSTALL.SKIP will be ignored
1b96321
# and valgrind.so will have been installed, so remove it
1b96321
if perl -MExtUtils::Install -e 'exit (($ExtUtils::Install::VERSION < 1.3702) ? 0 : 1);'; then
1b96321
	rm %{buildroot}%{perl_vendorlib}/auto/Test/Valgrind/Valgrind.so
1b96321
fi
1b96321
1b96321
%check
1b96321
make test
1b96321
1b96321
%clean
1b96321
rm -rf %{buildroot}
1b96321
1b96321
%files
1b96321
%doc Changes README samples/
1b96321
%{perl_vendorlib}/Test/
f1d33bc
%{_mandir}/man3/Test::Valgrind.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Action.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Action::Captor.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Action::Suppressions.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Action::Test.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Carp.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Command.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Command::Aggregate.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Command::Perl.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Command::PerlScript.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Component.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Parser.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Parser::Suppressions::Text.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Parser::Text.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Parser::XML.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Parser::XML::Twig.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Report.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Session.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Suppressions.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Tool.3*
f1d33bc
%{_mandir}/man3/Test::Valgrind::Tool::memcheck.3*
eadd866
%{_mandir}/man3/Test::Valgrind::Util.3*
501881d
%{_mandir}/man3/Test::Valgrind::Version.3*
1b96321
1b96321
%changelog
b17983d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19-2
b17983d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b17983d
21a1111
* Tue Aug  2 2016 Paul Howarth <paul@city-fan.org> - 1.19-1
21a1111
- Update to 1.19
21a1111
  - valgrind 3.1x will no longer be treated as valgrind 3.1.0, causing the
21a1111
    wrong command line arguments to be used (Debian bug 832833)
21a1111
  - The number of callers is now capped at 24, as this is the maximum number
21a1111
    supported by valgrind; a higher number of frames could lead to the
21a1111
    generation of unusable suppressions in both old and recent versions of
21a1111
    valgrind
21a1111
- BR: perl-generators
21a1111
- Simplify find commands using -empty and -delete
21a1111
9394977
* Mon May 16 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.18-3
9394977
- Perl 5.24 rebuild
9394977
99a9c78
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-2
99a9c78
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
99a9c78
501881d
* Mon Nov 16 2015 Paul Howarth <paul@city-fan.org> - 1.18-1
501881d
- Update to 1.18
501881d
  - A new Test::Valgrind::Version class has been added to represent valgrind
501881d
    version numbers, instead of lazily relying on version.pm
501881d
  - The detection of the valgrind executable has been slightly improved to
501881d
    cover some edge cases
501881d
  - Test failures on Windows, or with old versions of Test::More or File::Temp,
501881d
    have been addressed
501881d
  - A few extraneous warnings displayed by some tests when they were run with
501881d
    old versions of Test::Harness were silenced
501881d
- Drop bumped version requirements from previous build, no longer needed
501881d
eadd866
* Sun Nov 15 2015 Paul Howarth <paul@city-fan.org> - 1.17-1
eadd866
- Update to 1.17
eadd866
  - The Test::Valgrind tests will now be skipped when the default and
eadd866
    user-supplied suppressions files do not refer to any perl-related symbol;
eadd866
    this behaviour can be overridden by passing 'allow_no_supp => 1' to
eadd866
    Test::Valgrind->import
eadd866
  - Fix CPAN RT#101934: t/20-bad.t failing on armv7hl; while the root cause of
eadd866
    this issue is probably not at Test::Valgrind's level, it should
eadd866
    nevertheless not run the tests when the suppression files are obviously
eadd866
    insufficient
eadd866
  - The accuracy of the default perl suppression file has been improved
eadd866
  - The tests will be more reliably skipped when no valgrind or no suppressions
eadd866
    are found
eadd866
  - Segmentation faults during the analysis are now more gracefully handled
eadd866
  - 'no_def_supp => 1' will no longer cause the extra suppressions to be
eadd866
    ignored
eadd866
  - t/20-bad.t will no longer run the extra tests when no valgrind can be found
eadd866
    (this was a regression in version 1.15)
eadd866
- Bump version requirements for File::Temp/Test::Builder usage in test suite
eadd866
- Drop redundant %%{?perl_default_filter}
eadd866
f73a6ca
* Sat Oct 31 2015 Paul Howarth <paul@city-fan.org> - 1.15-1
f73a6ca
- Update to 1.15
f73a6ca
  - The new 'regen_def_supp' option can be passed to Test::Valgrind->import to
f73a6ca
    forcefully regenerate the default suppression file
f73a6ca
  - Fix build failures of the dummy XS code with PERL_IMPLICIT_SYS perls
f73a6ca
  - Fix handshake failures in tests with recent perls built with PERL_POISON
f73a6ca
  - Test: Improved diagnostics on failure
f73a6ca
  - Freshen Makefile.PL
f73a6ca
48a9740
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.14-6
48a9740
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
48a9740
11cf2f9
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-5
11cf2f9
- Perl 5.22 rebuild
11cf2f9
f1d33bc
* Wed Feb  4 2015 Paul Howarth <paul@city-fan.org> - 1.14-4
f1d33bc
- Classify buildreqs by usage
f1d33bc
28063d1
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.14-3
28063d1
- Perl 5.20 rebuild
28063d1
aefef64
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.14-2
aefef64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
aefef64
55f5eb4
* Sun Sep  1 2013 Paul Howarth <paul@city-fan.org> - 1.14-1
55f5eb4
- Update to 1.14
55f5eb4
  - This is a maintenance release; the code contains no functional change
55f5eb4
  - POD headings are now properly linkable
55f5eb4
  - Author tests are no longer bundled with this distribution
55f5eb4
  - The stack traces used in t/20-bad.t have been made more predictable when
55f5eb4
    compiler optimizations are in use
55f5eb4
- Drop buildreqs only needed for author tests
55f5eb4
f8ce63c
* Wed Aug 14 2013 Jitka Plesnikova <jplesnik@redhat.com> - 1.13-10
f8ce63c
- Perl 5.18 re-rebuild of bootstrapped packages
f8ce63c
66b850c
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-9
66b850c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
66b850c
87dc894
* Thu Jul 25 2013 Petr Pisar <ppisar@redhat.com> - 1.13-8
87dc894
- Perl 5.18 rebuild
87dc894
ba72a04
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-7
ba72a04
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ba72a04
5b27de5
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-6
5b27de5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5b27de5
e794d43
* Tue Jul 10 2012 Petr Pisar <ppisar@redhat.com> - 1.13-5
e794d43
- Perl 5.16 re-rebuild of bootstrapped packages
e794d43
8d0a4e3
* Mon Jun 18 2012 Petr Pisar <ppisar@redhat.com> - 1.13-4
8d0a4e3
- Perl 5.16 rebuild
8d0a4e3
1b96321
* Thu May  3 2012 Paul Howarth <paul@city-fan.org> - 1.13-3
1b96321
- Incorporate suggestions from package review (#803057)
1b96321
  - BR: perl(Pod::Coverage) ≥ 0.18
1b96321
  - BR: perl(XSLoader)
1b96321
  - BR: at least version 1.22 of perl(Test::Pod)
1b96321
  - BR: at least version 1.08 of perl(Test::Pod::Coverage)
1b96321
1b96321
* Tue Mar 13 2012 Paul Howarth <paul@city-fan.org> - 1.13-2
1b96321
- Sanitize for Fedora submission
1b96321
  - Use Fedora-style dist tag
1b96321
  - Drop %%defattr, redundant since rpm 4.4
1b96321
1b96321
* Mon Mar 12 2012 Paul Howarth <paul@city-fan.org> - 1.13-1
1b96321
- Initial RPM version