]> git.pld-linux.org Git - packages/perl-Test-FailWarnings.git/blob - perl-Test-FailWarnings.spec
- initial
[packages/perl-Test-FailWarnings.git] / perl-Test-FailWarnings.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    Test
6 %define         pnam    FailWarnings
7 Summary:        Test::FailWarnings - Add test failures if warnings are caught
8 Name:           perl-Test-FailWarnings
9 Version:        0.008
10 Release:        1
11 License:        apache
12 Group:          Development/Languages/Perl
13 Source0:        http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
14 # Source0-md5:  c03d51f550dbfd9945722ff7f4c32717
15 URL:            https://metacpan.org/release/Test-FailWarnings
16 BuildRequires:  perl-devel >= 1:5.8.0
17 BuildRequires:  rpm-perlprov >= 4.1-13
18 BuildRequires:  rpmbuild(macros) >= 1.745
19 %if %{with tests}
20 BuildRequires:  perl-Capture-Tiny >= 0.12
21 %endif
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 This module hooks $SIG{__WARN__} and converts warnings to Test::More
27 fail() calls. It is designed to be used with done_testing, when you
28 don't need to know the test count in advance.
29
30 Just as with Test::NoWarnings, this does not catch warnings if other
31 things localize $SIG{__WARN__}, as this is designed to catch unhandled
32 warnings.
33
34 %prep
35 %setup -q -n %{pdir}-%{pnam}-%{version}
36
37 %build
38 %{__perl} Makefile.PL \
39         INSTALLDIRS=vendor
40 %{__make}
41
42 %{?with_tests:%{__make} test}
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46
47 %{__make} pure_install \
48         DESTDIR=$RPM_BUILD_ROOT
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %files
54 %defattr(644,root,root,755)
55 %doc Changes README
56 %{perl_vendorlib}/Test/FailWarnings.pm
57 %{_mandir}/man3/Test::FailWarnings.3*
This page took 0.084045 seconds and 4 git commands to generate.