[R-pkg-devel] Setting valgrind options when running R CMD check --use-valgrind
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Wed Aug 23 22:49:17 CEST 2023
On 23/08/2023 2:54 p.m., Dirk Eddelbuettel wrote:
>
> When I invoke valgrind via
> R -d valgrind -e '...'
> the options in the file ~/.valgrindrc are being picked up. Good.
>
> When I invok valgrind via
> R CMD check --use-valgrind ...
> the options in the file ~/.valgrindrc are NOT being picked up. Bad.
>
> And valgrind complains. How can I add the needed options? Adding
> --debugger-args="...."
> does not work. Is there another trick?
I don't know the answer to your question, but here's something to try.
There's a way to run an "R CMD check" equivalent from a regular session,
so presumably it could be done from "R -d valgrind -e":
tools:::.check_packages(c("pkg", "--option1", "--option2"))
A likely problem is that many of the check tests are run in separate
processes; I don't know if the valgrind setting would be inherited or not.
Duncan Murdoch
More information about the R-package-devel
mailing list