Skip to content
Prev 6372 / 12125 Next

[R-pkg-devel] CRAN packages suggesting other packages but not using them conditionally

On 12/12/20 5:50 PM, Duncan Murdoch wrote:
How would you do that?  In "R CMD check --help" I see that one can 
use --test-dir= to specify the test directory, but I don't see a way to 
specify _additional_ test directories; short of setting a tests/ 
directory with CRAN-specific tests and a slowtests/ directory with 
*both* CRAN-specific and CRAN-excluded tests (thus duplicating files, 
which seems clunky), I don't see how to do this within a standard R CMD 
check framework (without testing a CRAN-indicating environment variable, 
which gets us back where we started ...)  Or would you run R CMD check 
twice, once without and once with --test-dir=slowtests ?

   There doesn't seem to be very much in "Writing R Extensions" about 
testing - a little bit in
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Package-subdirectories

   What am I missing?

  Just to clarify, the ideal would be to be able to designate a separate 
set of tests that were *not* run on CRAN, and to be able to run them in 
the same "R CMD check" pass as the CRAN-specific tests.  There are a 
bunch of ways to achieve this, but I think Spencer is saying (and I 
agree) that it would be nice if it were there an official mechanism that 
made this easier (and it seems pretty easy if the CRAN maintainers were 
agreeable to the idea ...)

Thread (15 messages)