[Rd] seeing feedback when R CMD check pkg runs unit tests.

Mario Frasca mario.frasca at nelen-schuurmans.nl
Fri Mar 2 16:49:45 CET 2012

good day here,

I'm maintaining a couple of R modules, both on r-forge.

tests for these modules are written making use of unit testing, and I
make use of the svUnit module, part of SciViews-R.

I also make use of examples in the .Rd files.

my question regards 'R CMD check pkg'.

if an _example_ is not run correctly, I get clear feedback on the
command line where I run 'R CMD check pkg'.  _unit tests_ on the other
hand may give failure or error, or may be marked as skipped.  all these
conditions are caught by the unit testing module that allows the unit
testing script to produce a complete report.

if the unit testing module manages to run the tests, the report is
generated and 'R CMD check pkg' will say "OK".

maybe you find here a more verbose description of the issue:

very briefly: I'd like the check to include the possibility to issue a
NOTE or a WARNING message, respectively for skipped and failing tests.

as I understood it, I can write my own check-my.R routine and use 'R CMD
check-my pkg'.

but this way my modules would check-my (on my system) differently than
they would check, say, on r-forge.  r-forge would tell me my module is
all right for releasing even if it has failing unit tests.

let me exaggerate: doesn't this sound to you as if unit testing was
discouraged by R?

many thanks for all replies,

More information about the R-devel mailing list