- 
                Notifications
    
You must be signed in to change notification settings  - Fork 340
 
Description
CRAN wants maintainers to run Valgrind on their packages, but when parallel testing is enabled, R CMD check --use-valgrind runs testthat.R and the examples under Valgrind, but not the actual tests.
What are the best practices for checking a package using testthat under Valgrind?
As far as I can tell, the least intrusive way to do so is to set the TESTTHAT_PARALLEL=FALSE environment variable, so all the tests are run in the same process and Valgrind output is produced, though I think the test that generated the output is not identified. (This variable is not documented anywhere, but perhaps it ought to be?)
However this foregoes the benefits of parallelisation, which would be particularly helpful given the speed hit of Valgrind. Is there a better way?