[R-pkg-devel] Tests run without --as-cran and not with

Jan van der Laan rhe|p @end|ng |rom eoo@@dd@@n|
Fri Sep 24 21:48:12 CEST 2021


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



More information about the R-package-devel mailing list