From ea50a6cb50d9d2202d1640e02ab22a90bc1d71e9 Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Tue, 14 Sep 2021 22:31:55 +0530 Subject: [PATCH] Add use-large-mem flag To include tests that require large amounts of RAM --- test/lib/Streamly/Test/Prelude/Common.hs | 2 ++ test/streamly-tests.cabal | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/test/lib/Streamly/Test/Prelude/Common.hs b/test/lib/Streamly/Test/Prelude/Common.hs index 5098b57d..6166b0f7 100644 --- a/test/lib/Streamly/Test/Prelude/Common.hs +++ b/test/lib/Streamly/Test/Prelude/Common.hs @@ -1754,7 +1754,9 @@ makeCommonOps t = , ("maxBuffer 0", t . maxBuffer 0) , ("maxThreads 0", t . maxThreads 0) , ("maxThreads 1", t . maxThreads 1) +#ifdef USE_LARGE_MEMORY , ("maxThreads -1", t . maxThreads (-1)) +#endif #endif ] diff --git a/test/streamly-tests.cabal b/test/streamly-tests.cabal index e9119332..a8312feb 100644 --- a/test/streamly-tests.cabal +++ b/test/streamly-tests.cabal @@ -15,6 +15,11 @@ flag limit-build-mem manual: True default: False +flag use-large-mem + description: Include tests that require large amount of memory + manual: True + default: False + flag dev description: Development build manual: True @@ -70,6 +75,9 @@ common compile-options if flag(limit-build-mem) ghc-options: +RTS -M512M -RTS + if flag(use-large-mem) + cpp-options: -DUSE_LARGE_MEMORY + common default-extensions default-extensions: BangPatterns