-
Notifications
You must be signed in to change notification settings - Fork 700
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ability for init script to ignore globally defined appdir when …
…building libraries. if executable, ignore library dir entry * Move FileCreators.hs suite to Init.hs and let it serve as unit test env for init * Add TESTING.md, describing how to create unit test env for cabal-install. * Add entry to CONTRIBUTING.md regarding `cabal-install` testing.
- Loading branch information
Showing
7 changed files
with
101 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Testing `cabal-install` | ||
|
||
Local testing | ||
======= | ||
|
||
In order to effectively test the `cabal-install` library, the `cabal-install.cabal` file must be modified | ||
to build the targets in the `/test` directory. The current recommended way to set this up is to | ||
use the [makefile](../Makefile) supplied in `Cabal` project parent directory, issuing the following command: | ||
|
||
|
||
``` | ||
> make cabal-install-dev | ||
``` | ||
|
||
This command will copy the dev `.cabal` generated by a project build into the `cabal-install.cabal`, and set your git index to ignore | ||
any changes to that file. Any subsequent changes to the `.cabal` should unset and reset the git index to make sure you don't end up committing it. | ||
From there, tests may be built with `cabal test` as usual. To choose a particular test so you don't end up running the whole thing, you can issue | ||
`tasty`-style pattern expressions like the following: | ||
|
||
``` | ||
> cabal run cabal-install:unit-tests -- -p /cabal init/ | ||
``` | ||
|
||
Please remember to test your changes! Happy hacking. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters