Skip to content

Commit 4573613

Browse files
committed
Merge PR #471.
2 parents 16a2327 + 75376d0 commit 4573613

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

network.cabal

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ tested-with: GHC == 8.0.2
5454
, GHC == 8.8.3
5555
, GHC == 8.10.1
5656

57+
flag devel
58+
description: using tests for developers
59+
default: False
60+
5761
library
5862
default-language: Haskell2010
5963
exposed-modules:
@@ -126,6 +130,8 @@ test-suite spec
126130
default-language: Haskell2010
127131
hs-source-dirs: tests
128132
main-is: Spec.hs
133+
if flag(devel)
134+
cpp-options: -DDEVELOPMENT
129135
other-modules:
130136
Network.Test.Common
131137
Network.SocketSpec

tests/Network/SocketSpec.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ spec = do
5858
bind sock (addrAddress addr) `shouldThrow` anyIOException
5959
-}
6060

61+
#ifdef DEVELOPMENT
6162
it "successfully binds to an ipv6 socket" $ do
6263
addr:_ <- getAddrInfo (Just hints) (Just serverAddr6) Nothing
6364
sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)
@@ -67,6 +68,7 @@ spec = do
6768
addr:_ <- getAddrInfo (Just hints) (Just "::6") Nothing
6869
sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)
6970
bind sock (addrAddress addr) `shouldThrow` anyIOException
71+
#endif
7072

7173
it "successfully binds to a unix socket, twice" $ do
7274
withSystemTempDirectory "haskell-network" $ \path -> do

0 commit comments

Comments
 (0)