On 21 April 2016 at 20:18, Jonathon Love wrote: | my next hurdle is to do with tests. normally, the contents of an R | packages tests directory ends up in /usr/share/doc/$packagename/tests | | so in this example: | | http://anonscm.debian.org/git/debian-science/packages/r-cran-rprotobuf.git/tree/tests | | i'd expect `runUnitTests.R` to turn up in | | /usr/share/doc/r-cran-rprotobuf/tests | | however, this doesn't happen. i usually begin a package by copy/pasting | an existing one, so i'm quite puzzled by this. | | any suggestions as to what i'm doing wrong?
The R package has tests/runUnitTests.R calling out to the files in inst/unitTests/ which became unitTests/ in the installed package. But they need their test driver -- but runUnitTests.R is not installed by R CMD INSTALL. That's just how it is. In the R world, tests happen (typically) via 'R CMD check sourceTarBall.tar.gz'. What you want here is not supported by default. I added it once or twice in the past for some packages (ie let tests be called from R for the installed package) but it is a mindset that never took hold in R land so I dropped it. I'd just skis this here. The package _does_ tests its installabilty during R CMD INSTALL by loading itself. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | [email protected]

