[R-pkg-devel] how to skip tests on CRAN but NOT on travis-ci?

Duncan Murdoch murdoch.duncan at gmail.com
Mon Jun 22 03:27:02 CEST 2015

On 21/06/2015 9:12 PM, Gábor Csárdi wrote:
> On Sun, Jun 21, 2015 at 8:52 PM, Duncan Murdoch
> <murdoch.duncan at gmail.com> wrote:
> [...]
>> But it's trivial to source files from the tests directory.
> It is actually often not trivial at all. E.g. if you have a test with
> setup/teardown, and the setup must be run before each test case, the
> teardown after, and you want to run each test case in a clean
> environment, this really does not play well with source-ing files.
> It is definitely possible, and probably works for smaller packages
> with simple tests, but imo it is not good practice.
>> Or perhaps
>> (I don't know, I don't use it) it's trivial to tell travis to run the
>> standard R CMD check, followed by the suggested one.
> Yes, it is trivial, but I think this is not good practice either. E.g.
> testthat gives you a summary in the end, and then you would need to
> look at multiple summaries. It is easy to forget about the multiple
> summaries, and miss one.
> I think it is way easier if you just invoke the testing once, and let
> it select what to run based on where it is running, what services are
> available, etc.

As long as the reports tell you what tests were skipped, this seems
reasonable too.

Duncan Murdoch

More information about the R-package-devel mailing list