R Under development (unstable) (2025-08-26 r88710 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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. > if (Sys.getenv("_LOCAL_TESTS_")=="TRUE") { ## not on CRAN + if(require("testthat", quietly = TRUE)) { + pkg <- "genepop" + require(pkg, character.only=TRUE, quietly=TRUE) + if (interactive()) {} else { + report <- test_check(pkg) ## for R CMD check ## report is NULL... + print(warnings()) # TODO? catch most of these by expect_warning(..) + } + if (FALSE) { ## tests not included in package (using data not included, etc.) + priv_testfiles <- dir(paste0("./package/tests_private/"),pattern="*.R$",full.names = TRUE) + priv_timings <- t(sapply(priv_testfiles, function(fich){ + cat(paste0("\n",fich)) + gc() + tps <- system.time(chk <- try(source(fich)), gcFirst=FALSE) + if (inherits(chk,"try-error")) warning(paste0(fich," generated an error")) + tps + })) + print(colSums(priv_timings)) # very roughly 1205.44 s elapsed for default maxtime (0.7) # much less after improving COMP + } + } else { + cat( "package 'testthat' not available, cannot run unit tests\n" ) + } + } > > # tools::compactPDF("D:/home/francois/travail/stats/Genepopplus/Genepop-FR/genepop/inst/doc") > > proc.time() user system elapsed 0.10 0.03 0.12