Skip to content

cabal v2-install ignores flag --run-tests #7267

Open
@andreasabel

Description

@andreasabel

(I searched whether this issue is already reported, but couldn't find it. If it exists, please tag it with cabal-install: cmd/install.)

It seems like

cabal v2-install --run-tests

simply ignores the option --run-tests. Neither a test-suite is run nor a warning is emitted that this option isn't valid.
Seems like this hasn't been working for 5 years at least, judging from the discussion at https://stackoverflow.com/questions/33040790/how-do-i-run-the-tests-that-are-part-of-an-installed-installing-cabal-package#comment53903271_33041029.

I would find cabal install --run-tests useful because it would run the tests with the sdist-generated package, ensuring that all files needed by the testsuite are packaged up correctly. (One easily forgets adding test files to extra-source-files in the .cabal file.)

I think while this is not working as expected, cabal should issue a warning that the flag is ignored.

I am using a recent version of the development branch:

$ cabal --version
cabal-install version 3.5.0.0
compiled using version 3.5.0.0 of the Cabal library 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions