Permalink
Browse files

Use cabal to build test suite.

Ignore-this: f93eacbcf5881d4650c7ea5ac21227b7

darcs-hash:20120420192008-0f649-dd4f2d8b2c3ac097b627d7300dc3d1aeceb155c9.gz
  • Loading branch information...
1 parent 05ea4d6 commit 0ccebcd747ff9b1a1d16a34816eb045199a0af61 @jgm committed Apr 20, 2012
Showing with 16 additions and 6 deletions.
  1. +1 −1 Setup.lhs
  2. +0 −3 Tests.lhs
  3. +15 −2 filestore.cabal
View
@@ -7,5 +7,5 @@
Run test suite.
-> runTestSuite _ _ _ _ = runCommand "runghc -idist/build/autogen Tests.lhs" >>= waitForProcess >>= exitWith
+> runTestSuite _ _ _ _ = runCommand "test-filestore" >>= waitForProcess >>= exitWith
View
@@ -1,9 +1,6 @@
#!/usr/bin/env runghc
This program runs tests for the filestore modules.
-Invoke it with:
-
- runghc -idist/build/autogen Tests.lhs
> import Data.FileStore
> import Data.List (sort, isInfixOf)
View
@@ -2,7 +2,6 @@ Name: filestore
Version: 0.4.1
Cabal-version: >= 1.2
Build-type: Custom
-Tested-with: GHC==6.10.1
Synopsis: Interface for versioning file stores.
Description: The filestore library provides an abstract interface for a versioning
file store, and modules that instantiate this interface. Currently
@@ -24,6 +23,10 @@ Extra-source-files: Tests.lhs
-- Type: darcs
-- Location: http://johnmacfarlane.net/repos/filestore
+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
@@ -51,7 +54,7 @@ Library
Other-modules: Paths_filestore,
Data.FileStore.DarcsXml,
Data.FileStore.MercurialCommandServer
- extensions: FlexibleInstances
+ extensions: FlexibleInstances, CPP
if flag(maxcount)
cpp-options: -DUSE_MAXCOUNT
@@ -61,3 +64,13 @@ Library
else
Ghc-Options: -Wall
Ghc-Prof-Options: -auto-all
+
+Executable test-filestore
+ if flag(tests)
+ Buildable: True
+ else
+ Buildable: False
+ Main-is: Tests.lhs
+ Build-depends: base >= 4 && < 5, HUnit >= 1.2 && < 1.3, mtl,
+ time, Diff
+

0 comments on commit 0ccebcd

Please sign in to comment.