Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 1ee17d30b068a75290e291d57e604865f9f65acc 1 parent 2227f54
Sean Leather authored

Showing 2 changed files with 20 additions and 37 deletions. Show diff stats Hide diff stats

  1. +2 34 Setup.lhs
  2. +18 3 emgm.cabal
36 Setup.lhs
@@ -14,42 +14,10 @@
14 14
15 15 module Main (main) where
16 16
17   -import System.Cmd
18   - ( system
19   - )
20   -
21   -import System.FilePath
22   - ( (</>)
23   - )
24   -
25   -import Distribution.Simple
26   - ( defaultMainWithHooks
27   - , simpleUserHooks
28   - , UserHooks(runTests)
29   - , Args
30   - )
31   -
32   -import Distribution.Simple.LocalBuildInfo
33   - ( LocalBuildInfo
34   - )
35   -
36   -import Distribution.PackageDescription
37   - ( PackageDescription
38   - )
  17 +import Distribution.Simple (defaultMain)
39 18
40 19 main :: IO ()
41   -main = defaultMainWithHooks hooks
42   - where
43   - hooks = simpleUserHooks
44   - { runTests = runTests'
45   - }
46   -
47   --- Run a 'test' binary that gets built when configured with '-ftest'.
48   -runTests' :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()
49   -runTests' _ _ _ _ = system cmd >> return ()
50   - where testdir = "dist" </> "build" </> "test"
51   - testcmd = "." </> "test"
52   - cmd = "cd " ++ testdir ++ " && " ++ testcmd
  20 +main = defaultMain
53 21
54 22 \end{code}
55 23
21 emgm.cabal
@@ -57,9 +57,13 @@ extra-source-files: README,
57 57 tests/ZipWith.hs,
58 58 util/hpc.lhs
59 59 extra-tmp-files: .hpc
60   -build-type: Custom
61   -cabal-version: >= 1.2.1
62   -tested-with: GHC == 6.8.3, GHC == 6.10.1
  60 +build-type: Simple
  61 +cabal-version: >= 1.9.2
  62 +tested-with: GHC == 7.0.1
  63 +
  64 +Source-Repository head
  65 + type: git
  66 + location: git://github.com/spl/emgm.git
63 67
64 68 --------------------------------------------------------------------------------
65 69
@@ -99,3 +103,14 @@ Library
99 103 ghc-options: -Wall
100 104 ghc-options: -O2
101 105
  106 +--------------------------------------------------------------------------------
  107 +
  108 +Test-Suite test
  109 + type: exitcode-stdio-1.0
  110 + hs-source-dirs: tests, src, examples
  111 + main-is: Main.hs
  112 + build-depends: base >= 3.0 && < 5.0,
  113 + HUnit >= 1.2 && < 1.3,
  114 + syb >= 0.3 && < 0.4,
  115 + QuickCheck >= 2.4 && < 2.5
  116 +

0 comments on commit 1ee17d3

Please sign in to comment.
Something went wrong with that request. Please try again.