patch: --enable-tests and --only-dependencies

Thomas Tuegel ttuegel at
Thu Feb 16 17:59:30 CET 2012

On Thu, Feb 16, 2012 at 10:46 AM, Andres Löh <andres at> wrote:
> Actually, the new solver will filter out --enable-tests for packages
> that don't define any. If the old solver could do the same, would that
> be an alternative to patch the Cabal lib?

Now that you mention it, I think the "best" thing to do would be to
simply not try to run tests during install if there aren't any. This
can just be a check added to 'installUnpackedPackage' in
Dist.Client.Install. This way, there aren't two code paths to
maintain. I will do that instead.

Can you explain why the modular solver filters out '--enable-tests'
for packages without tests? It doesn't seem like it should affect the
generated dependency list.

(I still want to patch the Cabal lib for this because it made me aware
of the fact that the 'test' phase behaves differently from every other
phase, but now I will postpone it until I do the other fixes the test
runner needs.)

Thomas Tuegel

More information about the cabal-devel mailing list