Skip to content

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

Closed
@spl

Description

@spl
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions