From e24031e753b10be136aefa86c95807c75b3e8ba9 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Sun, 23 May 2021 14:54:40 +0100 Subject: [PATCH] Do not run inspection tests in developer mode --- tests/Tests.hs | 8 ++++++-- text.cabal | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/Tests.hs b/tests/Tests.hs index 3177c08c..5d8c8a86 100644 --- a/tests/Tests.hs +++ b/tests/Tests.hs @@ -1,5 +1,5 @@ --- | Provides a simple main function which runs all the tests --- +{-# LANGUAGE CPP #-} + module Main ( main ) where @@ -10,14 +10,18 @@ import qualified Tests.Lift as Lift import qualified Tests.Properties as Properties import qualified Tests.Regressions as Regressions +#if !defined(ASSERTS) import qualified Tests.Inspection.Strict as InspectionStrict import qualified Tests.Inspection.Lazy as InspectionLazy +#endif main :: IO () main = defaultMain $ testGroup "All" [ Lift.tests , Properties.tests , Regressions.tests +#if !defined(ASSERTS) , InspectionStrict.tests , InspectionLazy.tests +#endif ] diff --git a/text.cabal b/text.cabal index 27c3fd63..a2ab267a 100644 --- a/text.cabal +++ b/text.cabal @@ -181,8 +181,6 @@ test-suite tests hs-source-dirs: tests main-is: Tests.hs other-modules: - Tests.Inspection.Lazy - Tests.Inspection.Strict Tests.Lift Tests.Properties Tests.Properties.Basics @@ -199,6 +197,15 @@ test-suite tests Tests.SlowFunctions Tests.Utils + -- Fusion tests fail in developer mode (because asserts break inlining) + -- and take ages to build. + if flag(developer) + cpp-options: -DASSERTS + else + other-modules: + Tests.Inspection.Lazy + Tests.Inspection.Strict + build-depends: QuickCheck >= 2.14.1 && < 2.15, base <5,