%global pkg_name Test-NoWarnings %global pkg_version 1.04 %global rpm_pkg_version 1.04 %global rpm_pkg_release 1.n0i.12 Summary: Make sure no warnings are emitted while testing Name: perl-%{pkg_name} Version: %{rpm_pkg_version} Release: %{rpm_pkg_release}%{?cpan_version}%{?dist} Group: Development/Libraries License: Artistic 2.0 URL: http://search.cpan.org/dist/%{pkg_name}/ Source0: http://www.cpan.org/authors/id/F/FD/FDALY/%{pkg_name}-%{pkg_version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: rpm-build-reb00t-perl BuildRequires: perl(ExtUtils::MakeMaker) %description In general, tests shouldn't produce warnings. This modules causes any warnings to be captured and stored. It automatically adds an extra test that will run when test scripts end to check that there were no warnings. If there were any warnings, the test will give a "not ok" and diagnostics of where, when and what the warning was, including a stack trace of what was going on when the it occurred. If some of the tests are supposed to produce warnings then they should be captured and checked with Test::Warn, that way Test::NoWarnings will not see them and so not complain. The test is run by an END block in Test::NoWarnings. It will not be run when any forked children exit. %prep %setup -q -n %{pkg_name}-%{pkg_version} %build %{perl_build} %{!?_without_test:%{__make} test} %install %{__rm} -rf $RPM_BUILD_ROOT %{perl_install} %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{perl_files} %doc Changes LICENSE README %changelog * Sun Mar 29 2015 Marius Feraru - 1.04-1.n0i.12 - version 1.04 * Sun Oct 21 2007 Marius Feraru - 0.08_4-1.n0i.11.0.084 - version 0.084 * Thu May 31 2007 Marius Feraru - 0.08_3-1.n0i.10.0.083 - spec file (re)created using N0i::CPAN::RPMizer/1.14.8 - version 0.083 * Wed Oct 12 2005 Marius Feraru 0.08_2-1.n0i.9.0.082 - version 0.082 * Tue Sep 13 2005 Marius Feraru 0.08_1-1.n0i.8.0.081 - version 0.081 * Sat Jul 23 2005 Marius Feraru 0.08-1.n0i.7 - spec file (re)created using N0i::CPAN::RPMizer/1.01 - rebuild on perl 5.8.7 * Sun Mar 20 2005 Marius Feraru 0.07-2.n0i.6 - automatic rebuild (perl 5.8.6) * Fri Dec 03 2004 Marius Feraru 0.07-1.n0i.5 - version 0.07 * Fri Apr 30 2004 Marius Feraru 0.06-3.n0i.4 - automatic rebuild * Thu Apr 22 2004 Marius Feraru 0.06-2.n0i.3 - spec file (re?)created using N0i::CPAN::RPMizer/2004032101 - rebuild (perl 5.8.4) * Thu Jan 22 2004 Marius FERARU 0.06-1.n0i.2 - automatic rebuild * Wed Dec 31 2003 Marius FERARU 0.06-0.n0i.1 - version 0.06 - spec file (re?)created using N0i::CPAN::RPMizer/2003102001