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

Already on GitHub? Sign in to your account

cabal install --enable-tests and running tests #1647

Closed
spl opened this Issue Jan 13, 2014 · 0 comments

Comments

Projects
None yet
1 participant

spl commented Jan 13, 2014

  • cabal configure --enable-tests builds tests. The user can later cabal test to run them.
  • cabal install --enable-tests builds tests and runs them.

The documentation for --enable-tests does not mention this discrepancy:

Build the test suites defined in the package description file during the build stage. Check for dependencies required by the test suites. If the package is configured with this option, it will be possible to run the test suites with the test command after the package is built.

I am sometimes installing multiple, interdependent packages at once, and I would like to enable the tests but only run some of them. Running all of the tests takes a long time.

In the interest of simplifying the UI and giving more control to the user, I propose that --enable-tests, for all commands, only builds the test suites and does not run them. To run tests on installation, we could perhaps add a flag --run-tests (which would imply --enable-tests) to cabal install.

Alternatively, if the above proposal is rejected, I would like to have a flag --do-not-run-tests (or some other meaningful name) for cabal install.

cabal-install version 1.18.0.2
using version 1.18.1.2 of the Cabal library

@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Mar 17, 2014

@23Skidoo 23Skidoo 'install --enable-tests' shouldn't actually run tests.
Add a new flag '--run-tests' for running tests. Fixes #1647.
f99a3ac

@23Skidoo 23Skidoo added a commit to 23Skidoo/cabal that referenced this issue Mar 21, 2014

@23Skidoo 23Skidoo 'install --enable-tests' shouldn't actually run tests.
Add a new flag '--run-tests' for running tests. Fixes #1647.
63fc9de

@23Skidoo 23Skidoo closed this in #1728 Apr 7, 2014

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