From hb at biostat.ucsf.edu  Sun Apr  8 22:38:05 2012
From: hb at biostat.ucsf.edu (Henrik Bengtsson)
Date: Sun, 8 Apr 2012 13:38:05 -0700
Subject: [Rd] Proposal: Mechanism for controlling the amount of testing 'R
 CMD check' performs
Message-ID: <CAFDcVCRt+ZDczWTNdpRd9ao2Rx=7_2fFkqK7ax5UBcSP6+0PLw@mail.gmail.com>

Hi,

I'd like to propose to introduce a standardized mechanism for
controlling the amount of testing that 'R CMD check' performs together
with an option to 'R CMD check' to specify if shallow or deep tests
should be performed.  I believe such a standardized feature would be
useful, especially because the recent CRAN Policies needs to limit the
computational load on CRAN servers, introducing an unfortunately
conflict between writing writing thorough system tests and having
light-weight tests for CRAN.

My solution to this has been to introduce use a system environment
'_R_CHECK_FULL_', which I set to TRUE (or leave blank), and have my
tests/*.R scripts test for this in order to either skip the test
completely or do for instance down sample the data tested, e.g.

if (Sys.getenv("_R_CHECK_FULL_") != "TRUE") {
  ...
}

Instead of such home-cooked solutions, I call for a more standardized
mechanism, e.g.

if (tools::checkLoadOK("CRAN")) {
  ...
}

and

R CMD check --allowed-load=CRAN ...

where predefined levels could be NONE < MINOR < CRAN < DEFAULT < MAJOR
< FULL, or similar.

This would also be useful in the iterative process of
developing/testing new features of one's package.

Comments?

/Henrik



[Rd] Proposal: Mechanism for controlling the amount of testing 'R CMD check' performs
Henrik Bengtsson