Add a flag for flaky tests

This commit is contained in:
Harendra Kumar 2021-09-14 23:19:54 +05:30
parent b82985820e
commit f6b88dc488
3 changed files with 12 additions and 2 deletions

View File

@ -85,8 +85,10 @@ testFoldOpsCleanup name f = do
it (name <> " asyncly") $ checkCleanupFold S.fromAsync (testOp f)
it (name <> " wAsyncly") $ checkCleanupFold S.fromWAsync (testOp f)
it (name <> " aheadly") $ checkCleanupFold S.fromAhead (testOp f)
#ifdef INCLUDE_FLAKY_TESTS
it (name <> " parallely") $ checkCleanupFold S.fromParallel (testOp f)
#endif
#endif
checkFoldMStrictness :: (IORef Int -> SerialT IO Int -> IO ()) -> IO ()
checkFoldMStrictness f = do

View File

@ -1628,13 +1628,13 @@ exceptionOps desc t = do
prop (desc <> " before") $ beforeProp t
prop (desc <> " after") $ afterProp t
prop (desc <> " bracket end of stream") $ bracketProp t
#ifdef DEVBUILD
#ifdef INCLUDE_FLAKY_TESTS
prop (desc <> " bracket partial stream") $ bracketPartialStreamProp t
#endif
prop (desc <> " bracket exception in stream") $ bracketExceptionProp t
prop (desc <> " onException") $ onExceptionProp t
prop (desc <> " finally end of stream") $ finallyProp t
#ifdef DEVBUILD
#ifdef INCLUDE_FLAKY_TESTS
prop (desc <> " finally partial stream") $ finallyPartialStreamProp t
#endif
prop (desc <> " finally exception in stream") $ finallyExceptionProp t

View File

@ -20,6 +20,11 @@ flag use-large-mem
manual: True
default: False
flag include-flaky-tests
description: Include tests that are unpredictable
manual: True
default: False
flag dev
description: Development build
manual: True
@ -78,6 +83,9 @@ common compile-options
if flag(use-large-mem)
cpp-options: -DUSE_LARGE_MEMORY
if flag(include-flaky-tests)
cpp-options: -DINCLUDE_FLAKY_TESTS
common default-extensions
default-extensions:
BangPatterns