Attempt to integrate test-suite w/ Cabal and Travis-CI
authorHerbert Valerio Riedel <hvr@gnu.org>
Fri, 18 Oct 2013 13:28:16 +0000 (15:28 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Fri, 18 Oct 2013 13:28:16 +0000 (15:28 +0200)
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
.travis.yml
filepath.cabal

index 15f96e3..8aa7583 100644 (file)
@@ -19,8 +19,10 @@ before_install:
 
 install:
  - cabal-1.18 update
- - PATH=/opt/ghc/$GHCVER/bin:$PATH cabal-1.18 install   --enable-tests --enable-benchmarks --only-dependencies
+ - PATH=/opt/ghc/$GHCVER/bin:$PATH cabal-1.18 install --only-dependencies
+ - PATH=/opt/ghc/$GHCVER/bin:$PATH cabal-1.18 install 'QuickCheck==2.6.*'
 
 script:
- - PATH=/opt/ghc/$GHCVER/bin:$PATH cabal-1.18 configure --enable-tests --enable-benchmarks -v2
+ - cd tests/ && PATH=/opt/ghc/$GHCVER/bin:$PATH runghc ./GenTests.hs
  - cabal-1.18 build
+ - cabal-1.18 test
\ No newline at end of file
index 570263d..c800edc 100644 (file)
@@ -32,6 +32,24 @@ Library
     Build-Depends:
         base >= 4 && < 4.8
 
+    ghc-options: -Wall
+
+-- When run directly from the Git repo, you need to
+-- generate the tests/FilePath_Tests.hs file via
+--
+--  cd tests/ && runghc ./GenTests.hs
+Test-Suite filepath-tests
+    type: exitcode-stdio-1.0
+    default-language: Haskell98
+    main-is: FilePath_Test.hs
+    hs-source-dirs: tests
+    other-modules: AutoTest
+    build-depends:
+        filepath,
+        base,
+        QuickCheck == 2.6.*,
+        random     == 1.0.*
+
 source-repository head
     type:     git
     location: http://git.haskell.org/packages/filepath.git