[R-pkg-devel] Skipping tests on CRAN

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Wed Apr 21 17:10:54 CEST 2021

You can default to have 'few tests'. That then happens at CRAN too when
nothing else is set (as there simply is no variable to rely upon).

You can then try to detect when you would want to run 'more tests'. Placing
the tests somewhere else (as Duncan suggested) to explicitly opt in is one
way (though you may forget to opt in...), making it depend on an extra
variable you set for more tests is another (though you may forget to set

So like to automate this via a 'testable condition' in the loader script in
tests/ that sets that environment variable for me. E.g. in Rcpp _if_ it sees
a version number such as which signals (via the fourth component)
that this is a 'development / interim' version it sets the controlling
environment variable run 'full / all tests'. Whereas at CRAN, the next
release will be 1.0.7, which is a release version and only the (default) few
tests run.

Hope this helps, Dirk

https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org

More information about the R-package-devel mailing list