From: Kacper Kornet Date: Tue, 23 Apr 2013 16:15:24 +0000 (+0100) Subject: - don't run tests requiring pty X-Git-Tag: auto/th/ack-2.02-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fack.git;a=commitdiff_plain;h=81f268ee361b3bdfb874c3b357df87f95be47fc6 - don't run tests requiring pty - adapterized --- diff --git a/ack-interactive-tests.patch b/ack-interactive-tests.patch new file mode 100644 index 0000000..36719b0 --- /dev/null +++ b/ack-interactive-tests.patch @@ -0,0 +1,11 @@ +--- t/Util.pm.orig 2013-04-23 16:50:35.000000000 +0100 ++++ t/Util.pm 2013-04-23 16:51:34.000000000 +0100 +@@ -403,7 +403,7 @@ + BEGIN { + my $has_io_pty = eval { + require IO::Pty; +- 1; ++ !exists($ENV{RUN_INTERACTIVE}) || $ENV{RUN_INTERACTIVE}; + }; + + sub has_io_pty { diff --git a/ack.spec b/ack.spec index 4a4bb74..6b06d57 100644 --- a/ack.spec +++ b/ack.spec @@ -3,6 +3,7 @@ # # Conditional build: %bcond_without tests # do not perform "make test" +%bcond_with pty_tests # do not perform tests requiring a pty # %include /usr/lib/rpm/macros.perl %define pdir ack @@ -13,12 +14,14 @@ Version: 2.02 Release: 1 License: GPL v1+ or Artistic Group: Development/Languages/Perl -Source0: http://www.cpan.org/modules/by-authors/id/P/PE/PETDANCE/ack-%{version}.tar.gz +Source0: http://www.cpan.org/modules/by-authors/id/P/PE/PETDANCE/%{name}-%{version}.tar.gz # Source0-md5: 9ae2c3939d0f069c6781ee5b6de47c27 Patch0: %{name}-deps.patch +Patch1: %{name}-interactive-tests.patch URL: http://betterthangrep.com/ %if %{with tests} BuildRequires: perl-File-Next >= 1.10 +%{?with_pty_tests:BuildRequires: perl-IO-Tty} BuildRequires: perl-Test-Simple >= 0.98 %endif BuildRequires: perl-devel >= 1:5.8.0 @@ -59,6 +62,7 @@ ack perl library. %prep %setup -q -n %{pdir}-%{version} %patch0 -p0 +%patch1 -p0 %build %{__perl} Makefile.PL \ @@ -67,7 +71,7 @@ ack perl library. CC="%{__cc}" \ OPTIMIZE="%{rpmcflags}" -%{?with_tests:%{__make} -j1 test} +%{?with_tests:%{!?with_pty_tests: RUN_INTERACTIVE=0} %{__make} -j1 test} %install rm -rf $RPM_BUILD_ROOT