summaryrefslogtreecommitdiff
path: root/packages/tests/hmatrix-tests.cabal
diff options
context:
space:
mode:
authorDenis Laxalde <denis@laxalde.org>2014-06-23 22:33:42 +0200
committerDenis Laxalde <denis@laxalde.org>2014-06-24 21:59:04 +0200
commit2f0a105e86a904afef5ba340aaa7aa2514a0da57 (patch)
treec5638962b1c21cec54a60e1c079f53d79674598e /packages/tests/hmatrix-tests.cabal
parentea299f1e482cb65d4a7371f0a5b49df2e4e62890 (diff)
Split out GSL tests from base ones
Move GSL tests into Numeric.GSL.Tests, separate the main into TestBase.hs and TestGSL.hs. In hmatrix-tests.cabal: - Split the test suite into a -base and -gsl ones - Add a `gsl` configuration flag to select GSL tests - Add a benchmark section One can now run hmatrix-base tests suite and benchmarks with: cabal configure --flag=-gsl --enable-tests --enable-benchmarks cabal tests cabal bench
Diffstat (limited to 'packages/tests/hmatrix-tests.cabal')
-rw-r--r--packages/tests/hmatrix-tests.cabal46
1 files changed, 39 insertions, 7 deletions
diff --git a/packages/tests/hmatrix-tests.cabal b/packages/tests/hmatrix-tests.cabal
index fec2f98..d48a9c4 100644
--- a/packages/tests/hmatrix-tests.cabal
+++ b/packages/tests/hmatrix-tests.cabal
@@ -15,18 +15,28 @@ cabal-version: >=1.8
15 15
16build-type: Simple 16build-type: Simple
17 17
18extra-source-files: CHANGES 18extra-source-files: CHANGES,
19 src/tests.hs 19 src/TestBase.hs,
20 src/TestGSL.hs,
21 src/Benchmark.hs
22
23flag gsl
24 description: Enable GSL tests
25 default: True
20 26
21library 27library
22 28
23 Build-Depends: base >= 4 && < 5, 29 Build-Depends: base >= 4 && < 5,
24 hmatrix >= 0.16, hmatrix-gsl >= 0.16, 30 QuickCheck >= 2, HUnit, random,
25 QuickCheck >= 2, HUnit, random 31 hmatrix >= 0.16
32 if flag(gsl)
33 Build-Depends: hmatrix-gsl >= 0.16
26 34
27 hs-source-dirs: src 35 hs-source-dirs: src
28 36
29 exposed-modules: Numeric.LinearAlgebra.Tests 37 exposed-modules: Numeric.LinearAlgebra.Tests
38 if flag(gsl)
39 exposed-modules: Numeric.GSL.Tests
30 40
31 other-modules: Numeric.LinearAlgebra.Tests.Instances, 41 other-modules: Numeric.LinearAlgebra.Tests.Instances,
32 Numeric.LinearAlgebra.Tests.Properties 42 Numeric.LinearAlgebra.Tests.Properties
@@ -38,8 +48,30 @@ source-repository head
38 type: git 48 type: git
39 location: https://github.com/albertoruiz/hmatrix 49 location: https://github.com/albertoruiz/hmatrix
40 50
41Test-Suite basic 51
42 Build-Depends: base, hmatrix-tests 52test-suite hmatrix-base-testsuite
53 type: exitcode-stdio-1.0
54 main-is: src/TestBase.hs
55 build-depends: base >= 4 && < 5,
56 hmatrix-tests,
57 QuickCheck >= 2, HUnit, random
58
59
60test-suite hmatrix-gsl-testsuite
43 type: exitcode-stdio-1.0 61 type: exitcode-stdio-1.0
44 main-is: src/tests.hs 62 main-is: src/TestGSL.hs
63 build-depends: base >= 4 && < 5,
64 hmatrix-tests,
65 QuickCheck >= 2, HUnit, random
66 if flag(gsl)
67 buildable: True
68 else
69 buildable: False
45 70
71
72benchmark hmatrix-base-benchmark
73 type: exitcode-stdio-1.0
74 main-is: src/Benchmark.hs
75 build-depends: base >= 4 && < 5,
76 hmatrix-tests,
77 QuickCheck >= 2, HUnit, random