covr icon indicating copy to clipboard operation
covr copied to clipboard

covr::package_coverage fails to find package when running examples and `install_path` is used.

Open MLopez-Ibanez opened this issue 2 years ago • 1 comments

 covr::package_coverage(type="all", quiet=FALSE, clean=FALSE, install_path="tmp-covr")
* installing *source* package ‘irace’ ...
** using non-staged installation
** libs
gcc -I"/opt/R/4.2.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -O0 --coverage -c iracebin/irace.c -o iracebin/irace.o
gcc  -g -O2  -O0 --coverage iracebin/irace.o -o iracebin/irace
gcc -I"/opt/R/4.2.1/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2  -O0 --coverage -c iracebin/ablation.c -o iracebin/ablation.o
gcc  -g -O2  -O0 --coverage iracebin/ablation.o -o iracebin/ablation
installing via 'install.libs.R' to /home/runner/work/irace/irace/tmp-covr/irace
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘irace’
    ablation                                example
    ablation_cmdline                        example
    buildCommandLine                        example
    getFinalElites                          example
    irace-package                           example
    irace                                   example
    irace.cmdline                           example
    path_rel2abs                            example
    plotAblation                            example
    printParameters                         example
    psRace                                  example
    readParameters                          example
    read_pcs_file                           example
    scenario_update_paths                   example
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (irace)
Testing examples for package ‘irace’
Error in find.package(package, lib.loc) : 
  there is no package called ‘irace’
Calls: <Anonymous> ... <Anonymous> -> .createExdotR -> Rd_db -> find.package
Execution halted

MLopez-Ibanez avatar Oct 13 '22 08:10 MLopez-Ibanez

This seems to only be true if you are running examples, e.g. if you use type = "tests" or type = "vignettes" it works as expected.

Definitely still an issue, just a reduction in the scope.

jimhester avatar Oct 18 '22 16:10 jimhester