[R-pkg-devel] Setting valgrind options when running R CMD check --use-valgrind
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Thu Aug 24 00:27:01 CEST 2023
On 23 August 2023 at 16:49, Duncan Murdoch wrote:
| 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.
Thanks for the reminder, I also re-realized by re-reading WRE that setting
VALGRIND_OPTS="...." works. And with that I am no longer fully sure I can
claim that ~/.valgrindrc was ignored. I may have misread an error.
Thanks for the prompt help, it is appreciated.
Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list