[Hackage] #901: Allow package properties to depend on --enable-tests and --enable-benchmarks.

Hackage cvs-ghc at haskell.org
Tue Nov 22 17:36:21 CET 2011


#901: Allow package properties to depend on --enable-tests and --enable-
benchmarks.
----------------------------+-----------------------------------------------
  Reporter:  guest          |        Owner:                   
      Type:  enhancement    |       Status:  new              
  Priority:  normal         |    Milestone:                   
 Component:  Cabal library  |      Version:  HEAD             
  Severity:  minor          |     Keywords:  tests, benchmarks
Difficulty:  unknown        |   Ghcversion:                   
  Platform:                 |  
----------------------------+-----------------------------------------------
 In containers, in order for tests to build we need to compile the whole
 library with -DTESTING.

 Although it is probably not The Right Design (TM), it is a simple way of
 exporting internals used by the tests.

 It would be great if the package properties could depend on whether the
 tests were enabled or disabled (possibly also on benchmarks),
 either by creating flags reflecting the {{{--enable-tests}}}, or by
 special syntax like {{{if enabled(tests)}}}, or anything else.

 Currently we have flag {{{testing}}}, so whenever we want to build the
 tests, we pass {{{-ftesting --enable-tests}}} to the cabal configure. But
 only {{{--enable-tests}}} should suffice, if the tests are meant to run
 automatically.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/901>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects



More information about the cabal-devel mailing list