File: Setup.hs

package info (click to toggle)
haskell-debian 3.64-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 364 kB
  • sloc: haskell: 3,226; ansic: 8; makefile: 3
file content (14 lines) | stat: -rw-r--r-- 359 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/runhaskell

import Distribution.Simple
import Distribution.Simple.Program
import System.Cmd
import System.Exit

main = defaultMainWithHooks simpleUserHooks {
       runTests = \ _ _ _ _ -> runTestScript
       }

runTestScript =
    system "runhaskell Test/Main.hs" >>= \ code ->
    if code == ExitSuccess then return () else error "Test Failure"