Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reconfigured cabal file to use new Cabal test framework.

Now run tests with

cabal configure --enable-tests
cabal build
cabal test
  • Loading branch information...
commit 3006c79270d8395032427da26a1aebb561660204 1 parent de51b0d
@jgm authored
Showing with 7 additions and 22 deletions.
  1. +1 −9 Setup.lhs
  2. +6 −13 filestore.cabal
View
10 Setup.lhs
@@ -1,11 +1,3 @@
#!/usr/bin/env runhaskell
> import Distribution.Simple
-> import System.Process
-> import System.Exit
-
-> main = defaultMainWithHooks $ simpleUserHooks { runTests = runTestSuite }
-
-Run test suite.
-
-> runTestSuite _ _ _ _ = runCommand "./dist/build/test-filestore/test-filestore" >>= waitForProcess >>= exitWith
-
+> main = defaultMain
View
19 filestore.cabal
@@ -1,6 +1,6 @@
Name: filestore
Version: 0.6
-Cabal-version: >= 1.8
+Cabal-Version: >= 1.10
Build-type: Custom
Synopsis: Interface for versioning file stores.
Description: The filestore library provides an abstract interface for a versioning
@@ -21,10 +21,6 @@ Source-repository head
type: git
location: git://github.com/jgm/filestore.git
-Flag tests
- default: False
- description: Build test suite
-
Flag maxcount
default: True
description: Make use of a recent (>= 2.3.0) Darcs feature which vastly improves the performance
@@ -52,24 +48,21 @@ Library
Other-modules: Paths_filestore,
Data.FileStore.DarcsXml,
Data.FileStore.MercurialCommandServer
- extensions: FlexibleInstances, CPP
-
+ Default-Extensions: FlexibleInstances, CPP
+ Default-Language: Haskell98
if flag(maxcount)
cpp-options: -DUSE_MAXCOUNT
- extensions: CPP
if impl(ghc >= 6.12)
Ghc-Options: -Wall -fno-warn-unused-do-bind
else
Ghc-Options: -Wall
Ghc-Prof-Options: -auto-all
-Executable test-filestore
- if flag(tests)
- Buildable: True
- else
- Buildable: False
+Test-suite test-filestore
+ Type: exitcode-stdio-1.0
Hs-source-dirs: tests
Main-is: Tests.lhs
+ Default-Language: Haskell98
Build-depends: base >= 4 && < 5,
HUnit >= 1.2 && < 1.3,
mtl,
Please sign in to comment.
Something went wrong with that request. Please try again.