Skip to content

Commit

Permalink
Run multiple test configurations with --builddir=
Browse files Browse the repository at this point in the history
  • Loading branch information
ttuegel committed Dec 22, 2014
1 parent f1b9009 commit 2fa64f6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ report.html
*.dyn_hi
*.dyn_o
.hpc
/dist/
/dist*
.*.swp
119 changes: 3 additions & 116 deletions numerical.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -147,125 +147,12 @@ Test-suite testsuite
,transformers-compat >= 0.3 && < 0.4
,ghc-prim
,numerical
--having an explicit list of other modules breaks hpc
ghc-options: -threaded
-- -fhpc
other-modules:
-- Numerical.Array.Layout
-- Numerical.Array.Layout.Base
-- Numerical.Array.Layout.Dense
-- Numerical.Array
-- --Control.Monad.State.ReallyStrict
-- --Numerical.Array.Operations
-- Numerical.Array.Shape
-- Numerical.InternalUtils
-- Numerical.Array.Storage
-- Numerical.Nat
-- Numerical.World
-- Numerical.Array.Mutable
-- Numerical.Array.Pure
-- Numerical.Array.Locality
-- Numerical.Array.Address
-- Control.NumericalMonad.State.Strict
-- Control.NumericalApplicative.Backwards
-- Numerical.Data.Vector.Pair
-- Numerical.Data.Vector.HPair
------
------
NumericalUnit.Shape
NumericalUnit.Layout
hs-source-dirs: tests
src
main-is: Main.hs


Test-suite testsuite-O2
default-language: Haskell2010
type: exitcode-stdio-1.0
build-depends: base >= 4.6 && < 4.9
,hspec==2.0.*
,hspec-expectations
,HUnit >= 1.2.5 && < 1.3
,primitive >= 0.5 && < 0.6
,vector >= 0.10 && < 0.12
,tagged >= 0.7 && < 0.8
,transformers >= 0.3 && < 0.5
,transformers-compat >= 0.3 && < 0.4
,ghc-prim
,numerical
--having an explicit list of other modules breaks hpc
ghc-options: -O2 -threaded
-- -fhpc
other-modules:
-- Numerical.Array.Layout
-- Numerical.Array.Layout.Base
-- Numerical.Array.Layout.Dense
-- Numerical.Array
-- --Control.Monad.State.ReallyStrict
-- --Numerical.Array.Operations
-- Numerical.InternalUtils
-- Numerical.Array.Shape
-- Numerical.Array.Storage
-- Numerical.Nat
-- Numerical.World
-- Numerical.Array.Mutable
-- Numerical.Array.Pure
-- Numerical.Array.Locality
-- Numerical.Array.Address
-- Control.NumericalMonad.State.Strict
-- Control.NumericalApplicative.Backwards
-- Numerical.Data.Vector.Pair
-- Numerical.Data.Vector.HPair
-- ------
-- ------
NumericalUnit.Shape
NumericalUnit.Layout
hs-source-dirs: tests
src
main-is: Main.hs


Test-suite testsuite-O2llvm
default-language: Haskell2010
type: exitcode-stdio-1.0
build-depends: base >= 4.6 && < 4.9
,hspec==2.0.*
,hspec-expectations
,HUnit >= 1.2.5 && < 1.3
,primitive >= 0.5 && < 0.6
,vector >= 0.10 && < 0.12
,tagged >= 0.7 && < 0.8
,transformers >= 0.3 && < 0.5
,transformers-compat >= 0.3 && < 0.4
,ghc-prim
,numerical
--having an explicit list of other modules breaks hpc
ghc-options: -O2 -threaded -fllvm
-- -fhpc
other-modules:
-- Numerical.Array.Layout
-- Numerical.Array.Layout.Base
-- Numerical.Array.Layout.Dense
-- Numerical.Array
-- --Control.Monad.State.ReallyStrict
-- --Numerical.Array.Operations
-- Numerical.Array.Shape
-- Numerical.Array.Storage
-- Numerical.InternalUtils
-- Numerical.Nat
-- Numerical.World
-- Numerical.Array.Mutable
-- Numerical.Array.Pure
-- Numerical.Array.Locality
-- Numerical.Array.Address
-- Numerical.Data.Vector.Pair
-- Numerical.Data.Vector.HPair
-- Control.NumericalMonad.State.Strict
-- Control.NumericalApplicative.Backwards
------
------
-- Only modules which are part of the test suite and not the library
-- should be listed here. These modules are excluded from the coverage
-- report because their coverage will be 100%.
NumericalUnit.Shape
NumericalUnit.Layout
hs-source-dirs: tests
src
main-is: Main.hs
17 changes: 17 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -e

cabal configure --enable-tests --enable-coverage
cabal build
cabal test

cabal configure --enable-tests --enable-coverage \
--builddir=dist-O2 --ghc-options="-O2"
cabal build --builddir=dist-O2
cabal test --builddir=dist-O2

cabal configure --enable-tests --enable-coverage \
--builddir=dist-O2-llvm --ghc-options="-O2 -fllvm"
cabal build --builddir=dist-O2-llvm
cabal test --builddir=dist-O2-llvm
35 changes: 0 additions & 35 deletions runTestsAndCoverage.sh

This file was deleted.

0 comments on commit 2fa64f6

Please sign in to comment.