Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow turning on tests/benchmarks per package #2809

Open
hesselink opened this issue Sep 4, 2015 · 3 comments
Open

Allow turning on tests/benchmarks per package #2809

hesselink opened this issue Sep 4, 2015 · 3 comments

Comments

@hesselink
Copy link
Contributor

In commercialhaskell/stack#917, it turns out it would be nice to be able to turn on tests (or benchmarks) selectively per package instead of for all of them at once. So when you do cabal install --enable-tests foo bar baz, it currently enables the test suites for all three packages. I'd want some way of specifying that I want to enable tests only for e.g. foo.

@ttuegel
Copy link
Member

ttuegel commented Sep 20, 2015

We should allow --enable-tests to take an optional list of packages so that --enable-tests=foo,bar only enables tests for foo and bar, but --enable-tests continues to enable tests for all explicit targets.

@grayjay
Copy link
Collaborator

grayjay commented Jul 16, 2017

I think this is possible with cabal install foo bar baz --constraint='foo test'.

@hvr
Copy link
Member

hvr commented Jul 17, 2017

Btw, this is also possible already via cabal.project files by using package-stanzas, e.g.

package foo
  tests: true
  benchmarks: true

package bar
  tests: false
  benchmarks: true

What's missing though is a convenient ability to enable/disable individual tests within a package when there's multiple testsuites defined in a package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants