joshuaulrich / xts

Extensible time series class that provides uniform handling of many R time series classes by extending zoo.
http://joshuaulrich.github.io/xts/
GNU General Public License v2.0
219 stars 71 forks source link

Disable RUnit reports when run via R CMD check #218

Closed joshuaulrich closed 6 years ago

joshuaulrich commented 6 years ago

This type of code writes report files in (sub-directories of) the directory where the package checked was installed, which is naughty according to the CRAN Repository Policy.

path <- system.file(package=pkg, "unitTests")
# ...
pathReport <- file.path(path, "report")

printTextProtocol(tests, showDetails=FALSE,
                  fileName=paste(pathReport, "Summary.txt", sep=""))
printTextProtocol(tests, showDetails=TRUE,
                  fileName=paste(pathReport, ".txt", sep=""))

So we need to disable report-generation if run via R CMD check.