[perlbrew/el5] better workaround for lack of done_testing
Iain Arnell
iarnell at fedoraproject.org
Sat Aug 13 14:12:01 UTC 2011
commit 80718838b6042135e012a96df1b500f0dc05c126
Author: Iain Arnell <iarnell at gmail.com>
Date: Sat Aug 13 16:11:16 2011 +0200
better workaround for lack of done_testing
older-Test-More.patch | 36 ------------------------------------
perlbrew.spec | 10 +++++++---
2 files changed, 7 insertions(+), 39 deletions(-)
---
diff --git a/perlbrew.spec b/perlbrew.spec
index d86d021..427652e 100644
--- a/perlbrew.spec
+++ b/perlbrew.spec
@@ -6,8 +6,6 @@ License: MIT
Group: Development/Libraries
URL: http://search.cpan.org/dist/App-perlbrew/
Source0: http://www.cpan.org/authors/id/G/GU/GUGOD/App-perlbrew-%{version}.tar.gz
-# allow tests to run on older Test::More for EPEL
-Patch0: older-Test-More.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl >= 1:5.8.0
@@ -40,7 +38,6 @@ almost like an isolated perl environments.
%prep
%setup -q -n App-perlbrew-%{version}
-%patch0 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -61,6 +58,12 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
rm t/installation.t
# no Test::Spec (yet)
rm t/installation2.t
+rm t/10.resolve.t
+# Test::More in EPEL doesn't understand done_testing; use no_plan instead
+for test in t/*.t ; do
+ grep -q '^plan tests' $test \
+ || sed -i 's/use Test::More;/use Test::More "no_plan";/;/done_testing;/d' $test
+done
make test
%clean
@@ -77,6 +80,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sat Aug 13 2011 Iain Arnell <iarnell at gmail.com> 0.28-1
- update to latest upstream version
+- better workaround for lack of done_testing
* Wed Jun 08 2011 Iain Arnell <iarnell at gmail.com> 0.24-1
- update to latest upstream version
More information about the scm-commits
mailing list