From ed4daafdc783c710af8e1c28a0610584fdf0d510 Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Fri, 13 Jun 2014 10:51:07 +0900
Subject: [PATCH] enable tests

---
 ghc-streaming-commons.spec | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/ghc-streaming-commons.spec b/ghc-streaming-commons.spec
index d55fc19..5f92ab1 100644
--- a/ghc-streaming-commons.spec
+++ b/ghc-streaming-commons.spec
@@ -2,9 +2,11 @@
 
 %global pkg_name streaming-commons
 
+%bcond_with tests
+
 Name:           ghc-%{pkg_name}
 Version:        0.1.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Common lower-level functions for streaming data libraries
 
 License:        MIT
@@ -23,6 +25,12 @@ BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-transformers-devel
 BuildRequires:  ghc-unix-devel
 BuildRequires:  ghc-zlib-devel
+%if %{with tests}
+BuildRequires:  ghc-QuickCheck-devel
+BuildRequires:  ghc-async-devel
+BuildRequires:  ghc-deepseq-devel
+BuildRequires:  ghc-hspec-devel
+%endif
 # End cabal-rpm deps
 
 %description
@@ -59,6 +67,12 @@ mv text_cbits.h include/
 %ghc_lib_install
 
 
+%check
+%if %{with tests}
+%cabal test
+%endif
+
+
 %post devel
 %ghc_pkg_recache
 
@@ -75,6 +89,9 @@ mv text_cbits.h include/
 
 
 %changelog
+* Fri Jun 13 2014 Jens Petersen <petersen@redhat.com> - 0.1.2-3
+- enable tests: cblrpm-0.8.11
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild