covr
covr copied to clipboard
options(covr.gcov="") does not disable coverage of compiled code
The documentation says:
If the appropriate gcov version is not on your path you can set the appropriate location with the covr.gcov options. If you set this path to “” it will turn off coverage of compiled code.
but I get this error:
options(covr.gcov="")
covr::codecov(type="all", quiet=FALSE)
Error in run_gcov(pkg$path, quiet = quiet, clean = clean) :
gcov not found
I'm trying to debug why covr::codecov fails with exit code 137: https://github.com/MLopez-Ibanez/irace/actions/runs/3229015515/jobs/5286000948
Run covr::codecov(type="all", quiet=FALSE)
* 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 /tmp/RtmpvPUkrl/R_LIBS4d7f6845358a/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’
Running specific tests for package ‘irace’
Running ‘testthat.R’
Error: Process completed with exit code 137.
Locally, it says:
> covr::codecov(type="all", quiet=FALSE)
* installing *source* package ‘irace’ ...
** using non-staged installation
** libs
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-jbaK_j/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O0 --coverage -c iracebin/irace.c -o iracebin/irace.o
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-jbaK_j/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O0 --coverage iracebin/irace.o -o iracebin/irace
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-jbaK_j/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O0 --coverage -c iracebin/ablation.c -o iracebin/ablation.o
gcc -std=gnu99 -g -O2 -fdebug-prefix-map=/build/r-base-jbaK_j/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O0 --coverage iracebin/ablation.o -o iracebin/ablation
installing via 'install.libs.R' to /tmp/RtmpiSf2tF/R_LIBS13f3a65ddf9a2/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’
Running specific tests for package ‘irace’
Running ‘testthat.R’
'/usr/bin/gcov' '/home/manu/work/irace/git/src/iracebin/ablation.gcno' '-p' \
'-o' '/home/manu/work/irace/git/src/iracebin'
/home/manu/work/irace/git/src/iracebin/ablation.gcda:cannot open data file, assuming not executed
File 'iracebin/irace.h'
Lines executed:0.00% of 36
Creating 'iracebin#irace.h.gcov'
'/usr/bin/gcov' '/home/manu/work/irace/git/src/iracebin/irace.gcno' '-p' '-o' \
'/home/manu/work/irace/git/src/iracebin'
/home/manu/work/irace/git/src/iracebin/irace.gcda:cannot open data file, assuming not executed
File 'iracebin/irace.h'
Lines executed:0.00% of 36
Creating 'iracebin#irace.h.gcov'
irace Coverage: 61.78%
R/cluster.R: 0.00%
R/parameterExploration.R: 0.00%
R/zzz.R: 0.00%
R/ablation.R: 16.91%
R/race-wrapper.R: 27.30%
R/main.R: 41.04%
R/parameterAnalysis.R: 44.74%
R/readConfiguration.R: 47.75%
R/utils.R: 48.34%
R/argparser.R: 72.73%
R/testing.R: 72.97%
R/irace.R: 80.50%
R/readParameters.R: 80.53%
R/tnorm.R: 80.60%
R/race.R: 81.16%
R/generation.R: 82.99%
R/model.R: 94.25%
R/path_rel2abs.R: 96.72%
R/timer.R: 100.00%
and it takes no time.