On 10/04/16 19:01, Andreas Tille wrote: > On Sun, Apr 10, 2016 at 12:42:13PM +0200, Gordon Ball wrote: >> I have written a patch[1] for autodep8 which generates implicit >> `library(foo)` tests for R packages. >> >> If I understand the current ci.debian.net set-up correctly, this would >> then be used for any matching[2] packages which don't have their own >> specific test configuration. >> >> Are there any serious objections to forwarding this to autodep8? (No >> guarantee they'd accept it, of course) > > Hmm, I tried to inspect your actual code in the web view[3] but this > returns 403. :-(
The webserver had an over-zealous list of fragments to block. Should work now. > > So no objections in principle if the code ensures that the more detailed > test that might be contained inside the package will not be overriden by > this simple test. This is my understanding. From [4] "If debian/tests/control is absent, the autodep8 tool can generate an automatic control file.", so anything with existing test rules should not be affected. > > As an enhancement I would suggest to detect what test suite of R > packages might be used by the package (testthat, ...) and run this one. > This might enable more sophisticated testing. I agree that this would be valuable (much more scope to catch subtle regressions than this test), but actually doing it seems difficult today. I read #752609, and it seems to me that a universal way of running tests is difficult while DESCRIPTION::Suggests are not uniformly translated into debian dependencies. You can try various test-system specific heuristics (eg, `grep testthat tests/*.R && grep-dctrl -F Suggests testthat DESCRIPTION`, if so run those files with additional dependency r-cran-testthat), but awkward corner cases seem likely. Some flag for preventing test generation would also be needed. > > Kind regards > > Andreas. > > PS: BTW, I'd consider the Build-Time tests (see #752609) as similarly > important to CI tests. I think the requirement is the same. If a package can run build-time tests (and hence there is a mechanism for running them, and ensuring the dependencies are available), then this can be fairly easily translated into a CI target. > >> [1]: https://git.chronitis.net/autodep8.git/rrequire/ >> [2]: Packages are matched by source name /^r-/ and having a >> ./DESCRIPTION file > [3] https://git.chronitis.net/autodep8.git/blob/rrequire/test/r_test.sh > [4]: https://people.debian.org/~mpitt/autopkgtest/README.package-tests.html

