Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gelisam/install-before-test
How to configure project.cabal so that tests are run after the install.
https://github.com/gelisam/install-before-test
Last synced: 22 days ago
JSON representation
How to configure project.cabal so that tests are run after the install.
- Host: GitHub
- URL: https://github.com/gelisam/install-before-test
- Owner: gelisam
- Created: 2014-04-27T13:33:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-04T14:37:01.000Z (over 10 years ago)
- Last Synced: 2023-04-13T07:57:03.175Z (over 1 year ago)
- Language: Haskell
- Size: 145 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Custom Cabal: installing before testing
===On [some projects](https://github.com/gelisam/hawk/issues/107), it's not possible to run the tests without installing, because the tests expect the project to be already installed. But with cabal, even if the user does want to install your package, the tests will still fail because cabal's test phase runs before the installation phase.
$ cabal install --enable-tests
Configuring hello-0.1.0.0...
Building hello-0.1.0.0...
Failed to install hello-0.1.0.0
[...output of the failed tests...]
hello-0.1.0.0 failed during the tests phase. The exception was:
ExitFailure 1This project demonstrates how to configure the project's cabal file so that tests are run first. The secret? A custom `Setup.hs`.
$ cabal install --enable-tests
Configuring hello-0.1.0.0...
Building hello-0.1.0.0...
[...silently running the tests...]
Installed hello-0.1.0.0