on master help sign in
Add a flag for flaky tests
f6b88dcHarendra Kumar
test/Streamly/Test/Prelude/Fold.hs+2
@@ -85,8 +85,10 @@ testFoldOpsCleanup name f = do
85 it (name <> " asyncly") $ checkCleanupFold S.fromAsync (testOp f)
85 it (name <> " asyncly") $ checkCleanupFold S.fromAsync (testOp f)
86 it (name <> " wAsyncly") $ checkCleanupFold S.fromWAsync (testOp f)
86 it (name <> " wAsyncly") $ checkCleanupFold S.fromWAsync (testOp f)
87 it (name <> " aheadly") $ checkCleanupFold S.fromAhead (testOp f)
87 it (name <> " aheadly") $ checkCleanupFold S.fromAhead (testOp f)
88+#ifdef INCLUDE_FLAKY_TESTS
88 it (name <> " parallely") $ checkCleanupFold S.fromParallel (testOp f)
89 it (name <> " parallely") $ checkCleanupFold S.fromParallel (testOp f)
89#endif
90#endif
91+#endif
90
92
91checkFoldMStrictness :: (IORef Int -> SerialT IO Int -> IO ()) -> IO ()
93checkFoldMStrictness :: (IORef Int -> SerialT IO Int -> IO ()) -> IO ()
92checkFoldMStrictness f = do
94checkFoldMStrictness f = do
test/lib/Streamly/Test/Prelude/Common.hs+2−2
@@ -1628,13 +1628,13 @@ exceptionOps desc t = do
1628 prop (desc <> " before") $ beforeProp t
1628 prop (desc <> " before") $ beforeProp t
1629 prop (desc <> " after") $ afterProp t
1629 prop (desc <> " after") $ afterProp t
1630 prop (desc <> " bracket end of stream") $ bracketProp t
1630 prop (desc <> " bracket end of stream") $ bracketProp t
1631−#ifdef DEVBUILD
1631+#ifdef INCLUDE_FLAKY_TESTS
1632 prop (desc <> " bracket partial stream") $ bracketPartialStreamProp t
1632 prop (desc <> " bracket partial stream") $ bracketPartialStreamProp t
1633#endif
1633#endif
1634 prop (desc <> " bracket exception in stream") $ bracketExceptionProp t
1634 prop (desc <> " bracket exception in stream") $ bracketExceptionProp t
1635 prop (desc <> " onException") $ onExceptionProp t
1635 prop (desc <> " onException") $ onExceptionProp t
1636 prop (desc <> " finally end of stream") $ finallyProp t
1636 prop (desc <> " finally end of stream") $ finallyProp t
1637−#ifdef DEVBUILD
1637+#ifdef INCLUDE_FLAKY_TESTS
1638 prop (desc <> " finally partial stream") $ finallyPartialStreamProp t
1638 prop (desc <> " finally partial stream") $ finallyPartialStreamProp t
1639#endif
1639#endif
1640 prop (desc <> " finally exception in stream") $ finallyExceptionProp t
1640 prop (desc <> " finally exception in stream") $ finallyExceptionProp t
test/streamly-tests.cabal+8
@@ -20,6 +20,11 @@ flag use-large-mem
20 manual: True
20 manual: True
21 default: False
21 default: False
22
22
23+flag include-flaky-tests
24+ description: Include tests that are unpredictable
25+ manual: True
26+ default: False
27+
23flag dev
28flag dev
24 description: Development build
29 description: Development build
25 manual: True
30 manual: True
@@ -78,6 +83,9 @@ common compile-options
78 if flag(use-large-mem)
83 if flag(use-large-mem)
79 cpp-options: -DUSE_LARGE_MEMORY
84 cpp-options: -DUSE_LARGE_MEMORY
80
85
86+ if flag(include-flaky-tests)
87+ cpp-options: -DINCLUDE_FLAKY_TESTS
88+
81common default-extensions
89common default-extensions
82 default-extensions:
90 default-extensions:
83 BangPatterns
91 BangPatterns