r-hub / rhub

R-hub API client
https://r-hub.github.io/rhub/
Other
353 stars 52 forks source link

Check on R-devel on Windows fails during test phase, time out? #512

Closed jranke closed 2 years ago

jranke commented 2 years ago

I have no idea why this fails, I don't see any clue in the build log

https://builder.r-hub.io/status/mkin_1.1.0.tar.gz-7a0d47e9722249fc98fc81de87b9acdd

or the artifacts

https://artifacts.r-hub.io/mkin_1.1.0.tar.gz-7a0d47e9722249fc98fc81de87b9acdd/mkin.Rcheck/tests/testthat.Rout.fail

Is there a timeout?

gaborcsardi commented 2 years ago

A timeout would kill the whole check, not just the tests. This seems like a crash during the test cases. Use a different reporter to see where the crash happens:

test_check(..., reporter = "summary")
jranke commented 2 years ago

OK, thanks. I believe this means I need to run the tests locally. The tests run fine on Linux (local, travis, r-hub) and Winbuilder with R-release, so it seems I need to install R-devel on Windows to see what happens with R-devel on Winbuilder and r-hub...

gaborcsardi commented 2 years ago

No, you don't need to run it locally, just modify that line in testthat.R as I suggested and then at least you will see where it crashes.

jranke commented 2 years ago

Ah, now I see what you mean! Thanks!

jranke commented 2 years ago

Well, I followed your advice, and now I get

✔  checking for unstated dependencies in 'tests'
─  checking tests (850ms)
E  Running 'testthat.R' (4m 22s)
   Running the tests in 'tests/testthat.R' failed.
   Complete output:
     > library(testthat)
     > library(mkin)
     Loading required package: parallel
     > 
     > test_check("mkin", reporter = "summary")
✔  checking for unstated dependencies in vignettes
✔  checking package vignettes in 'inst/doc'
─  checking running R code from vignettes
     'FOCUS_D.rmd' using 'UTF-8'... OK
     'FOCUS_L.rmd' using 'UTF-8'... OK
     'mkin.rmd' using 'UTF-8'... OK
     'twa.rmd' using 'UTF-8'... OK
    NONE
✔  checking re-building of vignette outputs (18.3s)
✔  checking PDF version of manual (16.9s)

─  Done with R CMD check
─  Cleaning up files and user

I guess it fails in the setup script. I will check using r-devel on Windows.

gaborcsardi commented 2 years ago

You need to look at at testthat.Rout file in the artifacts, that's where testthat's output is. Or testthat.Rout.fail.

jranke commented 2 years ago

I only get a testthat.Rout.fail containing

R Under development (unstable) (2022-02-21 r81789 ucrt) -- "Unsuffered Consequences"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(testthat)
> library(mkin)
Loading required package: parallel
> 
> test_check("mkin", reporter = "summary")

and nothing more... It seems testthat does not get to the stage where it reports something.

gaborcsardi commented 2 years ago

Yeah, then it does seem like it crashes in the setup file.

jranke commented 2 years ago

Thanks for your help anyways! I learned a lot :)

jranke commented 2 years ago

rhub is cool

gaborcsardi commented 2 years ago

Unfortunately this is hard to debug without access to a Windows machine, but at least you can try R-devel on win-builder as well, to see if this might be specific to R-hub, or not.

jranke commented 2 years ago

R-devel on winbuilder also just fails without any more info

jranke commented 2 years ago

R-devel on Windows is up and running over here now, I have a virtual Windows machine that I can use for this kind of stuff.

jranke commented 2 years ago

OK, I need to get Rtools 4.2, how often do you update Rtools on your windows machines?

gaborcsardi commented 2 years ago

No often, but rtools version very-very rarely matters. Especially if you don't have any compiled code.

jranke commented 2 years ago

I do rely on compiled code, but it does seem to be something else. Still investigating...

jranke commented 2 years ago

In some cases nlmixr (one of the packages that mkin uses as a backend) crashes the R instance on current R-devel on Windows... Therefore my test setup script never completes and I only get a testthat.Rout.fail file.