Skip to content

R CMD check --use-valgrind doesn't run valgrind on tests

4 messages · Brian Ripley, Yohan Chalabi, Charles Geyer

#
R CMD check --use-valgrind <packagename> used to run valgrind on the
tests in the tests directory of the package.  But it seems to have stopped.
R-2.9.1 doesn't -- at least on my box -- and neither does R-2.10.0 (devel).
I am not sure when this stopped.  I think 2.8.x did this.  The only old
R I have around is 2.6.0 and it certainly does.

R CMD check --help for 2.9.1 says (among other things)

    --use-valgrind    use 'valgrind' when running examples/tests/vignettes

so the documentation seems to say that the old behavior should also be
the current behavior, but it isn't -- at least on my box.

oak$ cat /etc/SuSE-release
openSUSE 11.0 (X86-64)
VERSION = 11.0
oak$ valgrind --version
valgrind-3.3.0
oak$ gcc --version
gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]

If this is just a stupid user problem and not a bug, how do I get the old
behavior (valgrind is run on tests).  BTW valgrind is run on examples
under 2.9.0, as cat <packagename>.Rcheck/<packagename>-Ex.Rout shows.
#
This was not implemented in R 2.9.x -- the comments in check.in don't 
agree with the usage, and it seemed unlikely that anyone really wanted 
this (it can be very slow, so perhaps a test at a time?), so this was 
intentional (apart from not altering the reported usage).

I've added it back for 2.9.2.

It also showed up that R CMD BATCH -d valgrind did not work (but 
--debugger=valgrind did): also fixed for 2.9.2.
On Sun, 16 Aug 2009, Charles Geyer wrote:

            

  
    
#
PBR> This was not implemented in R 2.9.x -- the comments in
   PBR> check.in don't
   PBR> agree with the usage, and it seemed unlikely that anyone
   PBR> really wanted
   PBR> this (it can be very slow, so perhaps a test at a time?),
   PBR> so this was
   PBR> intentional (apart from not altering the reported usage).
   PBR>
   PBR> I've added it back for 2.9.2.
   PBR>
   PBR> It also showed up that R CMD BATCH -d valgrind did not work
   PBR> (but
   PBR> --debugger=valgrind did): also fixed for 2.9.2.


It seems that 'R CMD check' uses now by default valgrind on tests with
the recent changes.

Shouldn't valgrind be only used with 'R CMD check --use-valgrind' ?


regards,
Yohan
#
On Mon, Aug 17, 2009 at 10:34:55AM +0100, Prof Brian Ripley wrote:
Well I ran it on all of my packages just before they shipped to CRAN
as well as --use-gct if the package used .Call.  Yes it was very slow
and yes that meant shipping a new version of a package took hours.
But it did catch several bugs before they shipped.  And I thought
the whole point of regression testing was to be automatic.
Thanks.  I think that's a good idea.
[rest deleted]