3 %bcond_without tests # do not perform "make test"
6 %define pnam Plugin-NoWarnings
7 %include /usr/lib/rpm/macros.perl
8 Summary: Test2::Plugin::NoWarnings - Fail if tests warn
9 Name: perl-Test2-Plugin-NoWarnings
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-authors/id/D/DR/DROLSKY/Test2-Plugin-NoWarnings-%{version}.tar.gz
15 # Source0-md5: e26bb1795ee9a0d382063977026cf795
16 URL: http://search.cpan.org/dist/Test2-Plugin-NoWarnings/
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRequires: perl-IPC-Run3
21 BuildRequires: perl-Test-Simple
22 BuildRequires: perl-Test2-Suite
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Loading this plugin causes your tests to fail if there any warnings
29 while they run. Each warning generates a new failing test and the
30 warning content is outputted via diag.
32 This module uses $SIG{__WARN__}, so if the code you're testing sets
33 this, then this module will stop working.
36 %setup -q -n %{pdir}-%{pnam}-%{version}
39 %{__perl} Makefile.PL \
43 %{?with_tests:%{__make} test}
46 rm -rf $RPM_BUILD_ROOT
48 %{__make} pure_install \
49 DESTDIR=$RPM_BUILD_ROOT
52 rm -rf $RPM_BUILD_ROOT
55 %defattr(644,root,root,755)
57 %{perl_vendorlib}/Test2/Event/Warning.pm
58 %{perl_vendorlib}/Test2/Plugin/NoWarnings.pm
59 %{_mandir}/man3/Test2*.3pm*