summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--.travis.yml9
-rw-r--r--bittorrent.cabal2
-rwxr-xr-xdev/update-dependencies.sh4
m---------sub/hspec0
-rw-r--r--tests/Main.hs3
-rw-r--r--tests/Spec.hs2
7 files changed, 11 insertions, 12 deletions
diff --git a/.gitmodules b/.gitmodules
index f35426da..1bc7a6d4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,9 +4,6 @@
4[submodule "sub/krpc"] 4[submodule "sub/krpc"]
5 path = sub/krpc 5 path = sub/krpc
6 url = git://github.com/pxqr/krpc.git 6 url = git://github.com/pxqr/krpc.git
7[submodule "sub/hspec"]
8 path = sub/hspec
9 url = https://github.com/DanielG/hspec.git
10[submodule "sub/optparse-applicative"] 7[submodule "sub/optparse-applicative"]
11 path = sub/optparse-applicative 8 path = sub/optparse-applicative
12 url = https://github.com/pcapriotti/optparse-applicative.git 9 url = https://github.com/pcapriotti/optparse-applicative.git
diff --git a/.travis.yml b/.travis.yml
index afdb1238..68b7e213 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,11 +4,8 @@ notifications:
4 email: false 4 email: false
5 5
6install: 6install:
7 - git clone https://github.com/pxqr/bencoding.git 7 - cabal sandbox init
8 - cd bencoding 8 - ./dev/update-dependencies.sh
9 - cabal install --force-reinstalls
10 - cd ..
11 - cabal install --enable-tests --enable-benchmark --force-reinstalls --only-dependencies
12 9
13script: 10script:
14 cabal configure --enable-tests --enable-benchmark && cabal build && cabal test \ No newline at end of file 11 - cabal configure --enable-tests --enable-benchmark && cabal build && ./dist/build/spec/spec \ No newline at end of file
diff --git a/bittorrent.cabal b/bittorrent.cabal
index f72adb4b..80b128a2 100644
--- a/bittorrent.cabal
+++ b/bittorrent.cabal
@@ -252,7 +252,7 @@ test-suite spec
252 , filepath 252 , filepath
253 253
254 -- * Testing 254 -- * Testing
255 , hspec >= 1.8.1.1 255 , hspec >= 1.8.2
256 , QuickCheck 256 , QuickCheck
257 , quickcheck-instances 257 , quickcheck-instances
258 258
diff --git a/dev/update-dependencies.sh b/dev/update-dependencies.sh
index ebe78608..c83694c3 100755
--- a/dev/update-dependencies.sh
+++ b/dev/update-dependencies.sh
@@ -2,6 +2,10 @@
2 2
3cd $(dirname $0)/.. 3cd $(dirname $0)/..
4 4
5git submodule init
5git submodule foreach git fetch 6git submodule foreach git fetch
6git submodule update --recursive --checkout --force 7git submodule update --recursive --checkout --force
8
9$(dirname $0)/add-sources.sh
10
7cabal install --enable-tests --only-dependencies --reinstall 11cabal install --enable-tests --only-dependencies --reinstall
diff --git a/sub/hspec b/sub/hspec
deleted file mode 160000
Subproject 6b5bf6fe8bc59909c5b7346f6f70fdfe643d115
diff --git a/tests/Main.hs b/tests/Main.hs
index 6577e6f4..75321ec7 100644
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -10,6 +10,7 @@ import System.Environment
10import System.Process 10import System.Process
11import System.Directory 11import System.Directory
12import Text.Printf 12import Text.Printf
13import Test.Hspec
13 14
14import Config 15import Config
15import Spec 16import Spec
@@ -64,7 +65,7 @@ terminateEnv = do
64runTestSuite :: [String] -> IO ExitCode 65runTestSuite :: [String] -> IO ExitCode
65runTestSuite args = do 66runTestSuite args = do
66 printf "running hspec test suite with args: %s\n" (show args) 67 printf "running hspec test suite with args: %s\n" (show args)
67 catch (withArgs args hspecMain >> return ExitSuccess) return 68 catch (withArgs args (hspec spec) >> return ExitSuccess) return
68 69
69main :: IO () 70main :: IO ()
70main = do 71main = do
diff --git a/tests/Spec.hs b/tests/Spec.hs
index 8d2b5139..b4e92e75 100644
--- a/tests/Spec.hs
+++ b/tests/Spec.hs
@@ -1 +1 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --hook-main #-} {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --no-main #-}