Skip to content

Commit

Permalink
Add tasty-rerun to test-suites
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Jul 16, 2024
1 parent 8ab2822 commit 9c55d88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ launch-*
/dist-chap
cabal.project.consensus

*/.tasty-rerun-log
ouroboros-consensus-cardano/test/tools-test/disk/chaindb/

# https://github.com/github/gitignore/blob/main/Haskell.gitignore
Expand All @@ -96,4 +97,4 @@ cabal.sandbox.config
cabal.project.local
cabal.project.local~
.HTF/
.ghc.environment.*
.ghc.environment.*
1 change: 1 addition & 0 deletions ouroboros-consensus/ouroboros-consensus.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ library unstable-consensus-testlib
tasty-golden,
tasty-hunit,
tasty-quickcheck >=0.11,
tasty-rerun,
template-haskell,
text,
time,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Main.Utf8 (withStdTerminalHandles)
import Options.Applicative (metavar)
import Test.Tasty
import Test.Tasty.Ingredients
import Test.Tasty.Ingredients.Basic
import Test.Tasty.Ingredients.Rerun
import Test.Tasty.Options
import Test.Tasty.QuickCheck

Expand All @@ -26,8 +28,12 @@ defaultMainWithTestEnv :: TestEnvConfig -> TestTree -> IO ()
defaultMainWithTestEnv testConfig testTree = do
cryptoInit
withStdTerminalHandles $
defaultMainWithIngredients (testEnvIngredient : defaultIngredients) $
withTestEnv testConfig testTree
defaultMainWithIngredients
( rerunningTests [ listingTests, consoleTestReporter ]
: testEnvIngredient
: defaultIngredients
)
( withTestEnv testConfig testTree )
where
testEnvIngredient :: Ingredient
testEnvIngredient = includingOptions [Option (Proxy :: Proxy TestEnv)]
Expand Down

0 comments on commit 9c55d88

Please sign in to comment.