Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 24 lines (16 sloc) 0.874 kb
#!/usr/bin/env runhaskell
In principle, we could do with a lot less than autoconfUserhooks, but simpleUserHooks
is not running 'configure'.
We will need Distribution.Simple to do the heavyweight lifting, and we will need some filePath magic.
> import System.FilePath
> import System.Process
> import Distribution.Simple
> import Distribution.Simple.LocalBuildInfo
> import Distribution.PackageDescription
The main program is just to make Cabal lift it. But we will override testing.
> main = defaultMainWithHooks hooks
> where hooks = autoconfUserHooks { runTests = runTests' }
Running tests is to call Combinatorrent with its parameters for tests:
> runTests' :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()
> runTests' _ _ _ lbi = system testprog >> return ()
> where testprog = (buildDir lbi) </> "Combinatorrent" </> "Combinatorrent --tests"
Jump to Line
Something went wrong with that request. Please try again.