Re: [R-pkg-devel] Tests run without --as-cran and not with
Thanks! That looks relevant. I think I have found the relevant source code in pandoc, and it seems it just calls Rscript without path. So it will probably call the dummy Rscript. Hmm, I'll have to think how to fix that. It is probably good that R CMD check checks this as this could cause weird errors when people have multiple versions of R on their system. Best, Jan On 30-09-2021 18:59, Ivan Krylov wrote: On Fri, 24 Sep 2021 21:48:12 +0200 Jan van der Laan wrote: my tests run fine when run with R CMD check, but not with R CMD check --as-cran <...> pandoc then calls R again with a script which is part of the package Part of R CMD check --as-cran is placing fake R and Rscript executables on the PATH (but currently not on Windows): https://github.com/r-devel/r-svn/blob/98f33a2a7b22f400d51220162cf400a0cfdc9aaf/src/library/tools/R/check.R#L279 https://github.com/r-devel/r-svn/blob/98f33a2a7b22f400d51220162cf400a0cfdc9aaf/src/library/tools/R/check.R#L6297-L6323 Does the pandoc script use the R_HOME variable to call the correct R executable? __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Tests run without --as-cran and not with
On Fri, 24 Sep 2021 21:48:12 +0200 Jan van der Laan wrote: > my tests run fine when run with R CMD check, but not with R CMD check > --as-cran <...> > pandoc then calls R again with a script which is part of the package Part of R CMD check --as-cran is placing fake R and Rscript executables on the PATH (but currently not on Windows): https://github.com/r-devel/r-svn/blob/98f33a2a7b22f400d51220162cf400a0cfdc9aaf/src/library/tools/R/check.R#L279 https://github.com/r-devel/r-svn/blob/98f33a2a7b22f400d51220162cf400a0cfdc9aaf/src/library/tools/R/check.R#L6297-L6323 Does the pandoc script use the R_HOME variable to call the correct R executable? -- Best regards, Ivan __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Tests run without --as-cran and not with
I am trying solve an issue where my tests run fine when run with R CMD check, but not with R CMD check --as-cran. In the tests pandoc is called using system; pandoc then calls R again with a script which is part of the package. The last part seems to fail, see error message below: Running ‘test_mdweave.R’ ERROR Running the tests in ‘tests/test_mdweave.R’ failed. Last 13 lines of output: > message("Weave file") Weave file > fn <- system.file(file.path("examples", md), package = "tinymarkdown") > mdweave(fn) Error running filter /home/eoos/git/tinymarkdown/work/tinymarkdown.Rcheck/tinymarkdown/scripts/filter.R: Filter returned error status 1 > As I mentioned, this only happend when testing with --as-cran. Without --as-cran the output is: * checking tests ... Running ‘test_file_subs_ext.R’ Running ‘test_mdtangle.R’ Running ‘test_mdweave.R’ OK * checking for unstated dependencies in vignettes ... OK Note that I already set the environment variable R_TEST to "" (https://github.com/r-lib/testthat/issues/144; I am not using testthat). This was also needed to get the check without --as-cran running. One thing that I notice it that R_LIBS and R_LIBS_SITE between the two ways of running R CMD check. However, I can't think why this would lead to the tests failing. Suggestions are welcome. In case someone wants to look, the code is here: https://github.com/djvanderlaan/tinymarkdown Thanks, Jan __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel