Skip to content

Commit

Permalink
Do not run inspection tests in developer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim authored and Lysxia committed May 25, 2021
1 parent 58bfda2 commit e24031e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 6 additions & 2 deletions tests/Tests.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- | Provides a simple main function which runs all the tests
--
{-# LANGUAGE CPP #-}

module Main
( main
) where
Expand All @@ -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
]
11 changes: 9 additions & 2 deletions text.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit e24031e

Please sign in to comment.