File: Setup.hs

package info (click to toggle)
tokyocabinet-haskell 0.0.5-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 308 kB
  • sloc: haskell: 2,276; makefile: 3
file content (14 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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