[ghc-HUnit] enable testsuites

Jens Petersen petersen at fedoraproject.org
Fri May 16 13:14:09 UTC 2014


commit e1e98f251cfe55fc42ff59c04616237ea91b9c1e
Author: Jens Petersen <petersen at redhat.com>
Date:   Fri May 16 22:13:54 2014 +0900

    enable testsuites

 ghc-HUnit.spec |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)
---
diff --git a/ghc-HUnit.spec b/ghc-HUnit.spec
index e2bd5eb..a95bb27 100644
--- a/ghc-HUnit.spec
+++ b/ghc-HUnit.spec
@@ -2,10 +2,12 @@
 
 %global pkg_name HUnit
 
+%bcond_without tests
+
 Name:           ghc-%{pkg_name}
 # part of haskell-platform
 Version:        1.2.5.2
-Release:        31%{?dist}
+Release:        32%{?dist}
 Summary:        Unit testing framework for Haskell
 
 License:        BSD
@@ -42,10 +44,6 @@ This package provides the Haskell %{pkg_name} library development files.
 %ghc_lib_build
 
 
-%check
-%cabal test
-
-
 %install
 %ghc_lib_install
 
@@ -53,6 +51,18 @@ This package provides the Haskell %{pkg_name} library development files.
 rm %{buildroot}%{_datadir}/%{pkg_name}-%{version}/{README,doc/Guide.html,examples/Example.hs,prologue.txt}
 
 
+%check
+%if %{with tests}
+mv HUnit.cabal HUnit.cabal.orig
+mv HUnit.cabal.tests HUnit.cabal
+cabal_configure_extra_options=--enable-tests
+%ghc_bin_build
+%cabal test
+mv HUnit.cabal HUnit.cabal.tests
+mv HUnit.cabal.orig HUnit.cabal
+%endif
+
+
 %post devel
 %ghc_pkg_recache
 
@@ -70,6 +80,9 @@ rm %{buildroot}%{_datadir}/%{pkg_name}-%{version}/{README,doc/Guide.html,example
 
 
 %changelog
+* Fri May 16 2014 Jens Petersen <petersen at redhat.com> - 1.2.5.2-32
+- enable tests
+
 * Mon Feb 24 2014 Jens Petersen <petersen at redhat.com> - 1.2.5.2-31
 - split out of haskell-platform
 


More information about the scm-commits mailing list