[packages/perl-Test-FailWarnings] - initial

arekm arekm at pld-linux.org
Tue Jul 21 11:08:52 CEST 2020


commit 029a76b4cf154570380cd72024627f37912ccdbd
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Jul 21 11:08:37 2020 +0200

    - initial

 perl-Test-FailWarnings.spec | 57 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
---
diff --git a/perl-Test-FailWarnings.spec b/perl-Test-FailWarnings.spec
new file mode 100644
index 0000000..bbcf9e3
--- /dev/null
+++ b/perl-Test-FailWarnings.spec
@@ -0,0 +1,57 @@
+#
+# Conditional build:
+%bcond_without	tests		# do not perform "make test"
+#
+%define		pdir	Test
+%define		pnam	FailWarnings
+Summary:	Test::FailWarnings - Add test failures if warnings are caught
+Name:		perl-Test-FailWarnings
+Version:	0.008
+Release:	1
+License:	apache
+Group:		Development/Languages/Perl
+Source0:	http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5:	c03d51f550dbfd9945722ff7f4c32717
+URL:		https://metacpan.org/release/Test-FailWarnings
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+BuildRequires:	rpmbuild(macros) >= 1.745
+%if %{with tests}
+BuildRequires:	perl-Capture-Tiny >= 0.12
+%endif
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This module hooks $SIG{__WARN__} and converts warnings to Test::More
+fail() calls. It is designed to be used with done_testing, when you
+don't need to know the test count in advance.
+
+Just as with Test::NoWarnings, this does not catch warnings if other
+things localize $SIG{__WARN__}, as this is designed to catch unhandled
+warnings.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+	INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{perl_vendorlib}/Test/FailWarnings.pm
+%{_mandir}/man3/Test::FailWarnings.3*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Test-FailWarnings.git/commitdiff/029a76b4cf154570380cd72024627f37912ccdbd



More information about the pld-cvs-commit mailing list