[perl-IO-Compress] Conditionalize long-running tests

Paul Howarth pghmcfc at fedoraproject.org
Tue Sep 21 10:18:27 UTC 2010


commit bcc8e8ea586b2a028a516f8df6621f1e6ec82b7f
Author: Paul Howarth <paul at city-fan.org>
Date:   Tue Sep 21 11:16:48 2010 +0100

    Conditionalize long-running tests
    
    Turn long-running tests back on and support build --without long_tests
    to skip them

 perl-IO-Compress.spec |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/perl-IO-Compress.spec b/perl-IO-Compress.spec
index 3e34a4a..67ea785 100644
--- a/perl-IO-Compress.spec
+++ b/perl-IO-Compress.spec
@@ -1,8 +1,9 @@
+%bcond_without long_tests
 %{?perl_default_filter}
 
 Name:           perl-IO-Compress
 Version:        2.030
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        IO::Compress Perl module
 License:        GPL+ or Artistic
 Group:          Development/Libraries
@@ -48,9 +49,9 @@ included with the IO-Compress distribution.
 %patch0 -p1 -b .old
 chmod -x lib/IO/Uncompress/{Adapter/Identity,RawInflate}.pm
 chmod -R 644 examples/io/anycat examples/io/bzip2/* examples/io/gzip/* \
-	examples/compress-zlib/*
+        examples/compress-zlib/*
 %{__perl} -pi -e 's|^#!/usr/local/bin/perl\b|#!%{__perl}|' examples/io/anycat \
-	examples/io/bzip2/* examples/io/gzip/* examples/compress-zlib/*
+        examples/io/bzip2/* examples/io/gzip/* examples/compress-zlib/*
 # https://rt.cpan.org/Public/Bug/Display.html?id=61402
 mv pod/FAQ.pod lib/IO/Compress ; %{__perl} -pi -e 's|pod/FAQ\.pod||' MANIFEST
 
@@ -69,23 +70,26 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
 %{_fixperms} $RPM_BUILD_ROOT/*
 
 %check
-# test hangs
-##make test COMPRESS_ZLIB_RUN_ALL=1
-make test
+# Build using "--without long_tests" to avoid very long tests
+# (full suite can take nearly an hour on an i7)
+make test %{?with_long_tests:COMPRESS_ZLIB_RUN_ALL=1}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-#%exclude %dir %{perl_privlib}/auto
 %doc Changes README examples/*
 %{perl_privlib}/*
 %{_mandir}/man3/*
 
 %changelog
+* Tue Sep 21 2010 Paul Howarth <paul at city-fan.org> 2.030-3
+- Turn long-running tests back on and support build --without long_tests
+  to skip them
+
 * Thu Sep 16 2010 Ville Skyttä <ville.skytta at iki.fi> - 2.030-2
-- Install IO::Compress::FAQ into usual POD and man dirs.
+- Install IO::Compress::FAQ into usual POD and man dirs (#634722)
 
 * Mon Jul 26 2010 Petr Sabata <psabata at redhat.com> 2.030-1
 - 2.030 version bump


More information about the scm-commits mailing list