r-lib / covr

Test coverage reports for R
https://covr.r-lib.org
Other
332 stars 114 forks source link

Report more on failure #570

Open hadley opened 2 months ago

hadley commented 2 months ago

In dev httr2, I see:

> covr::package_coverage(".")
Error:
! Failure in `/private/tmp/RtmpjTMbDX/R_LIBS975a77c099eb/httr2/httr2-tests/testthat.Rout.fail`
Hide Traceback
    ▆
 1. └─covr::package_coverage(".")
 2.   ├─withr::with_libpaths(...)
 3.   │ └─base::force(code)
 4.   ├─withr::with_envvar(...)
 5.   │ └─base::force(code)
 6.   ├─base::withCallingHandlers(...)
 7.   └─covr:::show_failures(out_dir)

And the only way to debug is to set clean = FALSE and then open the reference file (in this case it was because I'd just upgraded R and hadn't installed all the needed deps, but it's painful when it happens on CI).

latot commented 2 months ago

I agree, this would be so helpful, some times there is errors on CI, which are harder to debug due to this.