<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Oct 2, 2008 at 3:07 PM, David Roundy <span dir="ltr"><<a href="mailto:droundy@darcs.net">droundy@darcs.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Thu, Oct 02, 2008 at 02:59:01PM -0700, Jason Dagit wrote:<br>
> On Thu, Oct 2, 2008 at 2:49 PM, David Roundy <<a href="mailto:droundy@darcs.net">droundy@darcs.net</a>> wrote:<br>
><br>
> > Hi all,<br>
> ><br>
> > This is a patch that I'm probably going to stop working on myself, but<br>
> > which I'd be delighted if someone else were to make work. It (almost)<br>
> > makes the darcs test suite able to work with hpc, Haskell Program<br>
> > Coverage. This is a really cool but extremely awkard feature of ghc<br>
> > that tracks which expressions and which functions are run, so we could<br>
> > see how thorough our test suite is, and get a good idea as to what<br>
> > functions we might want to add new tests for.<br>
> ><br>
> > The trouble is that it always dumps its output in the working<br>
> > directory in which darcs is called. Since the test suite cleans up<br>
> > after itself, this makes it awkward to get the coverage data out. The<br>
> > approach I tried in this patch is to create a wrapper that calls darcs<br>
> > and then rescues the data.<br>
><br>
><br>
> I thought we already accepted patches for this? I recall contacting the<br>
> author of HPC and discussing solutions with him. The fix was to add a<br>
> feature to HPC so that the tix files could be collected somewhere other than<br>
> the working directory. Off the top of my head I thought this was done via<br>
> an env variable.<br>
><br>
> After that, I seem to recall someone providing patches to make this work. I<br>
> admit, I didn't yet play with it, but now that I'm running ghc6.8.3 I was<br>
> going to try it out soon. In fact, I was hoping to mention the coverage in<br>
> my thesis as a versus type witnesses sort of thing.<br>
><br>
> Ah, yes see here:<br>
> <a href="http://lists.osuosl.org/pipermail/darcs-users/2008-May/012255.html" target="_blank">http://lists.osuosl.org/pipermail/darcs-users/2008-May/012255.html</a><br>
><br>
> It almost works, but doesn't really, as I can see that the coverage<br>
> > sometimes drops as the test suite is run. Debugging it is really not<br>
> > a good use of my time, and the best and simplest option would probably<br>
> > be to fix ghc to allow you to configure the directory in which the<br>
> > darcs.tix data is dumped (e.g. by an environment variable).<br>
><br>
><br>
> And then use ghc <a href="http://6.8.3." target="_blank">6.8.3.</a> In fact, I thought someone even made the results<br>
> web accessible, but the URL is now a 404:<br>
> <a href="http://www.downstairspeople.org/darcs-hpc/hpc_index.html" target="_blank">http://www.downstairspeople.org/darcs-hpc/hpc_index.html</a><br>
><br>
> My vote is to not add this complexity and instead just use a sufficiently<br>
> recent ghc when these statistics are wanted.<br>
<br>
</div></div>I feel very foolish, you're right that the docs are right there in<br>
darcs. My problem was that I'm running with ghc 6.8.2, and that hpc<br>
docs haven't been fixed to reflect that this bugfix went in, see:<br>
<br>
<a href="http://projects.unsafeperformio.com/hpc/" target="_blank">http://projects.unsafeperformio.com/hpc/</a><br>
<br>
and<br>
<br>
<a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/hpc.html" target="_blank">http://www.haskell.org/ghc/docs/latest/html/users_guide/hpc.html</a><br>
<br>
So it's not just me being stupid, the ghc docs are out of date.</blockquote><div><br>That's unfortunate about the docs. Here is Andy's blog about the feature in question:<br><a href="http://blog.unsafeperformio.com/?p=21">http://blog.unsafeperformio.com/?p=21</a><br>
<br>I'm glad we stopped you before you rewrote the whole test suite :)<br><br>Jason<br></div></div><br></div>