haskell / haskell/cabal

Test suite for `cabal` the binary should be isolated/independent

Open
#11,048 3 comments 3 reactions 0 assignees View on GitHub
cabal-testsuite continuous-integration type: enhancement type: testing
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Currently, `cabal-testsuite` (which seems to be the main way cabal the binary is tested) cannot be used as a stand-alone binary to run the tests.

The reasons seem to be:

- it requires sources that are part of the repository
- there is a generated module that depends on the current cached `LocalBuildInfo` and hardcodes it into the binary, which then is used to reconstruct arguments to `ghc` when compiling tests
- it's not clear to me whether this is only required for the `Setup.hs` tests or the `cabal-install` binary tests as well (e.g. there is `--skip-setup-tests` but my observation is that this isn't really enough)

The end goal I have is:

- build and test is strictly separated in CI and the test step does not involve building anything other than the tests
- tests can be run on the end users system (ultimately through GHCup)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.