[perl-IO-Prompt] use bcond to disable tests by default
Iain Arnell
iarnell at fedoraproject.org
Sat Nov 5 07:45:23 UTC 2011
commit 267098850d62641f0b48b9bb3f69c2fc71eabe9f
Author: Iain Arnell <iarnell at gmail.com>
Date: Sat Nov 5 08:37:09 2011 +0100
use bcond to disable tests by default
perl-IO-Prompt.spec | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/perl-IO-Prompt.spec b/perl-IO-Prompt.spec
index 76a533c..bc602d6 100644
--- a/perl-IO-Prompt.spec
+++ b/perl-IO-Prompt.spec
@@ -15,11 +15,16 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
+# tests require working /dev/tty - disabled by default for koji
+# see https://rt.cpan.org/Public/Bug/Display.html?id=54807
+%bcond_with check
+
BuildRequires: perl(IO::Handle)
BuildRequires: perl(POSIX)
BuildRequires: perl(Term::ReadKey)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Pod)
+BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(version)
BuildRequires: perl(Want)
@@ -61,8 +66,11 @@ find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
%check
-%{?!_with_chec: echo Not running tests unless --with check is specificed }
-%{?_with_check: make test }
+%if %{with check}
+ make test
+%else
+ echo "Not running tests unless --with check is specified"
+%endif
%clean
More information about the perl-devel
mailing list