[darcs-users] darcs patch: fix tests to sort of work with hpc.

David Roundy droundy at darcs.net
Thu Oct 2 22:07:38 UTC 2008

On Thu, Oct 02, 2008 at 02:59:01PM -0700, Jason Dagit wrote:
> On Thu, Oct 2, 2008 at 2:49 PM, David Roundy <droundy at darcs.net> wrote:
> > Hi all,
> >
> > This is a patch that I'm probably going to stop working on myself, but
> > which I'd be delighted if someone else were to make work.  It (almost)
> > makes the darcs test suite able to work with hpc, Haskell Program
> > Coverage.  This is a really cool but extremely awkard feature of ghc
> > that tracks which expressions and which functions are run, so we could
> > see how thorough our test suite is, and get a good idea as to what
> > functions we might want to add new tests for.
> >
> > The trouble is that it always dumps its output in the working
> > directory in which darcs is called.  Since the test suite cleans up
> > after itself, this makes it awkward to get the coverage data out.  The
> > approach I tried in this patch is to create a wrapper that calls darcs
> > and then rescues the data.
> I thought we already accepted patches for this?  I recall contacting the
> author of HPC and discussing solutions with him.  The fix was to add a
> feature to HPC so that the tix files could be collected somewhere other than
> the working directory.  Off the top of my head I thought this was done via
> an env variable.
> After that, I seem to recall someone providing patches to make this work.  I
> admit, I didn't yet play with it, but now that I'm running ghc6.8.3 I was
> going to try it out soon.  In fact, I was hoping to mention the coverage in
> my thesis as a versus type witnesses sort of thing.
> Ah, yes see here:
> http://lists.osuosl.org/pipermail/darcs-users/2008-May/012255.html
> It almost works, but doesn't really, as I can see that the coverage
> > sometimes drops as the test suite is run.  Debugging it is really not
> > a good use of my time, and the best and simplest option would probably
> > be to fix ghc to allow you to configure the directory in which the
> > darcs.tix data is dumped (e.g. by an environment variable).
> And then use ghc 6.8.3.  In fact, I thought someone even made the results
> web accessible, but the URL is now a 404:
> http://www.downstairspeople.org/darcs-hpc/hpc_index.html
> My vote is to not add this complexity and instead just use a sufficiently
> recent ghc when these statistics are wanted.

I feel very foolish, you're right that the docs are right there in
darcs.  My problem was that I'm running with ghc 6.8.2, and that hpc
docs haven't been fixed to reflect that this bugfix went in, see:




So it's not just me being stupid, the ghc docs are out of date.


More information about the darcs-users mailing list