aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Setup.hs b/Setup.hs
index 200a2e51d..bdef399a8 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,3 +1,13 @@
import Distribution.Simple
-main = defaultMain
+import System.Process ( runCommand, waitForProcess )
+import System.Directory ( setCurrentDirectory )
+
+main = defaultMainWithHooks (simpleUserHooks {runTests = runTestSuite})
+
+testDir = "tests"
+
+runTestSuite _ _ _ _ = do
+ setCurrentDirectory testDir
+ runCommand "runhaskell RunTests.hs" >>= waitForProcess
+ return ()