diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | .travis.yml | 9 | ||||
-rw-r--r-- | bittorrent.cabal | 2 | ||||
-rwxr-xr-x | dev/update-dependencies.sh | 4 | ||||
m--------- | sub/hspec | 0 | ||||
-rw-r--r-- | tests/Main.hs | 3 | ||||
-rw-r--r-- | tests/Spec.hs | 2 |
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 | ||
6 | install: | 6 | install: |
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 | ||
13 | script: | 10 | script: |
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 | ||
3 | cd $(dirname $0)/.. | 3 | cd $(dirname $0)/.. |
4 | 4 | ||
5 | git submodule init | ||
5 | git submodule foreach git fetch | 6 | git submodule foreach git fetch |
6 | git submodule update --recursive --checkout --force | 7 | git submodule update --recursive --checkout --force |
8 | |||
9 | $(dirname $0)/add-sources.sh | ||
10 | |||
7 | cabal install --enable-tests --only-dependencies --reinstall | 11 | cabal 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 | |||
10 | import System.Process | 10 | import System.Process |
11 | import System.Directory | 11 | import System.Directory |
12 | import Text.Printf | 12 | import Text.Printf |
13 | import Test.Hspec | ||
13 | 14 | ||
14 | import Config | 15 | import Config |
15 | import Spec | 16 | import Spec |
@@ -64,7 +65,7 @@ terminateEnv = do | |||
64 | runTestSuite :: [String] -> IO ExitCode | 65 | runTestSuite :: [String] -> IO ExitCode |
65 | runTestSuite args = do | 66 | runTestSuite 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 | ||
69 | main :: IO () | 70 | main :: IO () |
70 | main = do | 71 | main = 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 #-} | ||