Skip to content

Commit 5f51c89

Browse files
Use hspec's parallel evaluation
1 parent 2cda6b9 commit 5f51c89

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

constrained-generators.cabal

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ test-suite constrained-tests
138138
-Wredundant-constraints
139139
-Wunused-packages
140140
-rtsopts
141+
-threaded
142+
-with-rtsopts=-N
141143

142144
build-depends:
143145
QuickCheck >= 2.15.0.1,

test/Constrained/GraphSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ return []
110110

111111
tests :: Bool -> Spec
112112
tests _nightly =
113-
describe "Graph tests" $ sequence_ [ prop n (checkCoverage $ withMaxSuccess 1000 p) | (n, p) <- $allProperties ]
113+
describe "Graph tests" $ parallel $ sequence_ [ prop n (checkCoverage $ withMaxSuccess 1000 p) | (n, p) <- $allProperties ]

test/Constrained/Tests.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ testAll :: IO ()
5858
testAll = hspec $ tests False
5959

6060
tests :: Bool -> Spec
61-
tests nightly =
61+
tests nightly = parallel $
6262
describe "constrained" . modifyMaxSuccess (\ms -> if nightly then ms * 10 else ms) $ do
6363
testSpec "signumPositive" signumPositive
6464
testSpec "setOfPairLetSpec" setOfPairLetSpec

test/Tests.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ import Test.Hspec
99
main :: IO ()
1010
main = do
1111
nightly <- isJust <$> lookupEnv "NIGHTLY"
12-
hspec $ do
12+
hspec $ parallel $ do
1313
Tests.tests nightly
1414
Graph.tests nightly

0 commit comments

Comments
 (0)