make cabal test run our unit tests

This commit is contained in:
Simon Michael 2009-07-31 17:03:35 +00:00
parent 5939a93d95
commit 9ac76cff35
2 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,12 @@
#!/usr/bin/env runhaskell
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.PackageDescription
import System.FilePath
import System.Process
main = defaultMain
main = defaultMainWithHooks $ simpleUserHooks{runTests=runTests'}
runTests' :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()
runTests' _ _ _ lbi = system testprog >> return ()
where testprog = (buildDir lbi) </> "hledger" </> "hledger test"

View File

@ -21,7 +21,7 @@ bug-reports: http://code.google.com/p/hledger/issues
stability: experimental
tested-with: GHC==6.8, GHC==6.10
cabal-version: >= 1.2
build-type: Simple
build-type: Custom
extra-tmp-files:
extra-source-files: