From 301a336bdc1b43e3ce637da51653042fe670eef7 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Sat, 24 Dec 2011 21:07:35 +0100 Subject: Use a cabal test-suite section instead of the deprecated runTests hook --- Setup.lhs | 5 +---- hmatrix.cabal | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Setup.lhs b/Setup.lhs index ba435f0..0d80d1b 100644 --- a/Setup.lhs +++ b/Setup.lhs @@ -8,13 +8,10 @@ > import System.Process(system) > import Config(config) -> main = defaultMainWithHooks simpleUserHooks { confHook = c, runTests = t } +> main = defaultMainWithHooks simpleUserHooks { confHook = c } > c x y = do > binfo <- confHook simpleUserHooks x y > pbi <- config binfo > let pkg_descr = localPkgDescr binfo > return $ binfo { localPkgDescr = updatePackageDescription pbi pkg_descr } - -> t _ _ _ _ = system ( "runhaskell examples/tests.hs") >> return() - diff --git a/hmatrix.cabal b/hmatrix.cabal index bfe875d..63da6fb 100644 --- a/hmatrix.cabal +++ b/hmatrix.cabal @@ -23,7 +23,7 @@ Description: Purely functional interface to basic linear algebra Category: Math tested-with: GHC ==6.10.4, GHC ==6.12.1, GHC ==6.12.3, GHC ==7.0.1, GHC==7.0.2, GHC==7.2.1 -cabal-version: >=1.6 +cabal-version: >=1.8 build-type: Custom @@ -224,3 +224,16 @@ source-repository head -- type: exitcode-stdio-1.0 -- main-is: examples/tests.hs +test-suite test-hmatrix + type: exitcode-stdio-1.0 + main-is: tests.hs + build-depends: hmatrix + , base + , QuickCheck + , storable-complex + , array + , process + , HUnit + , random + hs-source-dirs: lib, examples + Extensions: ForeignFunctionInterface, CPP -- cgit v1.2.3