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

Thomas Tuegel ttuegel at gmail.com
Thu Feb 16 17:04:56 CET 2012


Sorry for the delay!

On Sun, Feb 12, 2012 at 5:55 AM, Andres Löh <andres at well-typed.com> wrote:
> Modular solver support for optional stanzas is done. Regarding your
> patches, there's one aspect I don't understand:
>
> In Distribution/Client/Install.hs:
>
>    configBenchmarks = toFlag False,
>    configTests = toFlag (TestStanzas `elem` stanzas)
>
> You first had configBenchmarks analogous to configTests, then changed
> it back. I don't fully understand why the two should be handled
> differently. Could you please explain?

These lines control whether a package is actually built with its tests
and benchmarks. Although the resolver pulls in benchmark dependencies
now, I didn't enable actually building the benchmarks because we
wouldn't do anything with the results anyway.

Actually, since we won't be running test suites automatically (until
the next release of Cabal), they should probably be disabled, too.

> Do you happen to know existing packages that make use of benchmark
> stanzas that I could use as test cases?

No, sorry. :(

> The current diff to the trunk (all I intend to push) is here:
>
>   http://www.andres-loeh.de/cabal-install-enable-tests-3.dpatch

I'm getting this warning in the modular solver:

> Distribution/Client/Dependency/Modular/Message.hs:80:1:
>     Warning: Pattern match(es) are non-exhaustive
>              In an equation for `showFR':
>                  Patterns not matched: _ (MalformedStanzaChoice _)

It seems innocuous, but you would know better than I. Otherwise,
everything looks good.

I'm working on the patch for Cabal that we need in order to run tests
automatically. Hopefully, I'll send it to the list this afternoon.
Then, after the cabal-install release, we can turn automatic tests
back on.

Thanks!

-- 
Thomas Tuegel



More information about the cabal-devel mailing list