Skip to content
Prev 7535 / 12125 Next

[R-pkg-devel] CRAN submission error when running tests in testthat

On Thu, 25 Nov 2021 12:33:01 +0100
G?bor Cs?rdi <csardi.gabor at gmail.com> wrote:

            
Indeed you're right, R CMD check truncating the output is the main
problem here. With a full traceback, it would at least be possible to
see which dependency crashes R on CRAN Macs. I should have been more
clear in my e-mail.

By "testthat hiding output" I mean that there's no *.Rout[.fail] files
for every file in tests/testthat/*.R with line-by-line output of the
test code. In cases when R itself crashes in the middle of the test run,
these *.Rout.fail files could be useful to find out which line caused
the crash. With testthat, crashing the R process during tests results
in a single testthat.Rout.fail:
...
...
Here, the traceback makes the answer obvious, but it's not always so.
With serious heap corruption, it's possible to get just:
With no indication of the call or the file causing the crash.

You are right that this is not the main problem here: if the test
output wasn't truncated by R CMD check, we would know the origin of the
crash, even without testthat.