Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update cabal file and Setup.lhs, incl. test-suite

  • Loading branch information...
commit 1ee17d30b068a75290e291d57e604865f9f65acc 1 parent 2227f54
Sean Leather authored
Showing with 20 additions and 37 deletions.
  1. +2 −34 Setup.lhs
  2. +18 −3 emgm.cabal
36 Setup.lhs
View
@@ -14,42 +14,10 @@
module Main (main) where
-import System.Cmd
- ( system
- )
-
-import System.FilePath
- ( (</>)
- )
-
-import Distribution.Simple
- ( defaultMainWithHooks
- , simpleUserHooks
- , UserHooks(runTests)
- , Args
- )
-
-import Distribution.Simple.LocalBuildInfo
- ( LocalBuildInfo
- )
-
-import Distribution.PackageDescription
- ( PackageDescription
- )
+import Distribution.Simple (defaultMain)
main :: IO ()
-main = defaultMainWithHooks hooks
- where
- hooks = simpleUserHooks
- { runTests = runTests'
- }
-
--- Run a 'test' binary that gets built when configured with '-ftest'.
-runTests' :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()
-runTests' _ _ _ _ = system cmd >> return ()
- where testdir = "dist" </> "build" </> "test"
- testcmd = "." </> "test"
- cmd = "cd " ++ testdir ++ " && " ++ testcmd
+main = defaultMain
\end{code}
21 emgm.cabal
View
@@ -57,9 +57,13 @@ extra-source-files: README,
tests/ZipWith.hs,
util/hpc.lhs
extra-tmp-files: .hpc
-build-type: Custom
-cabal-version: >= 1.2.1
-tested-with: GHC == 6.8.3, GHC == 6.10.1
+build-type: Simple
+cabal-version: >= 1.9.2
+tested-with: GHC == 7.0.1
+
+Source-Repository head
+ type: git
+ location: git://github.com/spl/emgm.git
--------------------------------------------------------------------------------
@@ -99,3 +103,14 @@ Library
ghc-options: -Wall
ghc-options: -O2
+--------------------------------------------------------------------------------
+
+Test-Suite test
+ type: exitcode-stdio-1.0
+ hs-source-dirs: tests, src, examples
+ main-is: Main.hs
+ build-depends: base >= 3.0 && < 5.0,
+ HUnit >= 1.2 && < 1.3,
+ syb >= 0.3 && < 0.4,
+ QuickCheck >= 2.4 && < 2.5
+
Please sign in to comment.
Something went wrong with that request. Please try again.