Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions accelerate.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ test-suite nofib-interpreter
build-depends:
base >= 4.10
, accelerate
, tasty

ghc-options:
-O2
Expand Down
9 changes: 5 additions & 4 deletions src/Data/Array/Accelerate/Test/NoFib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ import Data.Array.Accelerate.Test.NoFib.Spectral
import Data.Array.Accelerate.Test.NoFib.Issues
import Data.Array.Accelerate.Test.NoFib.Misc

import Test.Tasty
import Test.Tasty.Runners
import Test.Tasty.Ingredients.Rerun
import System.Environment
#endif
import Test.Tasty


nofib :: RunN -> IO ()
nofib :: RunN -> TestTree -> IO ()
#ifdef ACCELERATE_DISABLE_NOFIB
nofib _ = error $ unlines [ "Data.Array.Accelerate: the nofib test-suite has been disabled."
nofib _ _ = error $ unlines [ "Data.Array.Accelerate: the nofib test-suite has been disabled."
, "Reinstall package 'accelerate' with '-fnofib' to enable it."
]
#else
nofib runN = do
nofib runN test_runq = do
me <- getProgName
defaultMainWithIngredients [rerunningTests (nofibIngredient : defaultIngredients)]
$ localOption (NumThreads 1) -- run each test sequentially with many cores
Expand All @@ -61,6 +61,7 @@ nofib runN = do
, test_spectral runN
, test_issues runN
, test_misc runN
, test_runq
]
#endif

3 changes: 2 additions & 1 deletion test/nofib/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import Data.Array.Accelerate.Test.NoFib
import Data.Array.Accelerate.Interpreter

import System.Environment
import Test.Tasty

main :: IO ()
main = do
setEnv "TASTY_INTERPRETER" "True"
setEnv "TASTY_HEDGEHOG_TESTS" "50"
nofib runN
nofib runN (testGroup "runQ" [])

Loading