Skip to content

Commit 5fafe08

Browse files
committed
patch for interactively testing covr (trying with older Metworx BP)
1 parent dbf07a9 commit 5fafe08

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

R/coverage.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
#' The basename of `out_dir` should be the package name and version pasted together
99
#'
1010
#' @keywords internal
11-
add_coverage <- function(pkg_source_path, out_dir, timeout = Inf) {
11+
add_coverage <- function(pkg_source_path, out_dir, timeout = Inf, ...) {
1212
# run covr
1313
pkg_name <- basename(out_dir)
1414

1515
res_cov <- tryCatch({
16-
coverage_list <- run_covr(pkg_source_path, timeout)
16+
coverage_list <- run_covr(pkg_source_path, timeout, ...)
1717

1818
# If no testable functions are found in the package, `filecoverage` and `totalcoverage`
1919
# will yield logical(0) and NaN respectively. Coerce to usable format
@@ -66,12 +66,12 @@ add_coverage <- function(pkg_source_path, out_dir, timeout = Inf) {
6666
#' Run covr in subprocess with timeout
6767
#'
6868
#' @noRd
69-
run_covr <- function(path, timeout) {
69+
run_covr <- function(path, timeout, ...) {
7070
callr::r_safe(
71-
function(p) {
72-
covr::coverage_to_list(covr::package_coverage(p, type = "tests"))
71+
function(p, ...) {
72+
covr::coverage_to_list(covr::package_coverage(p, type = "tests", ...))
7373
},
74-
args = list(path),
74+
args = list(path, ...),
7575
libpath = .libPaths(),
7676
repos = NULL,
7777
package = FALSE,

pkgr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Packages:
99
- styler
1010

1111
Repos:
12-
- CRAN: https://cran.rstudio.com
13-
- MPN: https://mpn.metworx.com/snapshots/stable/2022-10-20 # used for metrum packages
12+
- MPN: https://mpn.metworx.com/snapshots/stable/2024-03-01 # used for metrum packages
1413

1514
Lockfile:
1615
Type: renv
1716

1817

18+
Rpath: ${R_EXE_4_1}

tests/testthat/test-results.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
describe("covr and rcmdcheck success", {
44

55
it("no rcmdcheck warnings", {
6+
browser()
67
local_check_envvar()
78
# Create temp package that will succeed
89
pkg_setup <- pkg_dirs$pkg_setups_df %>% dplyr::filter(pkg_type == "pass_success")

0 commit comments

Comments
 (0)