Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 538 Bytes
import Distribution.Simple
import Distribution.PackageDescription
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..))
import System.Cmd (system)
import System.FilePath
main = defaultMainWithHooks $ simpleUserHooks { runTests = myTestRunner }
myTestRunner :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()
myTestRunner _ _ pkg_descr lbi = mapM_ (system . path) $ executables pkg_descr
where
path exec = let name = (dropExtension . exeName) exec
in (buildDir lbi) </> name </> name
Something went wrong with that request. Please try again.