[Hackage] #467: Add support for HPC profiling.
Hackage
cvs-ghc at haskell.org
Sun Jan 9 18:38:52 CET 2011
#467: Add support for HPC profiling.
----------------------------+-----------------------------------------------
Reporter: duncan | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Cabal-1.8
Component: Cabal library | Version: 1.6.0.1
Severity: normal | Keywords:
Difficulty: normal | Ghcversion:
Platform: |
----------------------------+-----------------------------------------------
Comment(by tibbe):
Currently the best way to get test coverage is to:
{{{
cabal configure --enable-tests --ghc-option=-fhpc
cabal build
cabal test
hpc markup <test-suite-binary.tix>
}}}
This dumps a bunch of HTML files in the root directory of the package.
I suggest we add a configure flag `--enable-test-coverage` that:
* adds `ghc-option: -fhpc` to all libraries,
* runs the `cabal test` binaries in some working directory other than the
root to not clutter it with .tix files,
* runs `hpc <test-suite-binary.tix> --destdir=dist/SOMETHING` on all .tix
files, and
* prints the location of the HTML index files to stdout.
We might want to opt-out the test suite's `main-is` file from the report.
Perhaps using a flag.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/467#comment:3>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list