rcmdcheck/0000755000176200001440000000000014124357312012177 5ustar liggesusersrcmdcheck/NAMESPACE0000644000176200001440000000244714123056601013421 0ustar liggesusers# Generated by roxygen2: do not edit by hand S3method(as.data.frame,rcmdcheck) S3method(print,rcmdcheck) S3method(print,rcmdcheck_comparison) S3method(print,rcmdcheck_comparison_summary) S3method(summary,rcmdcheck) S3method(summary,rcmdcheck_comparison) S3method(xopen,rcmdcheck) export(check_details) export(compare_checks) export(compare_to_cran) export(cran_check_flavours) export(cran_check_results) export(parse_check) export(parse_check_url) export(rcmdcheck) export(rcmdcheck_process) importFrom(R6,R6Class) importFrom(callr,rcmd_process) importFrom(callr,rcmd_process_options) importFrom(callr,rcmd_safe) importFrom(cli,cli_progress_bar) importFrom(cli,cli_progress_update) importFrom(cli,is_dynamic_tty) importFrom(cli,symbol) importFrom(curl,handle_setopt) importFrom(curl,multi_add) importFrom(curl,multi_cancel) importFrom(curl,multi_list) importFrom(curl,multi_run) importFrom(curl,new_handle) importFrom(curl,new_pool) importFrom(desc,desc) importFrom(desc,description) importFrom(digest,digest) importFrom(pkgbuild,pkgbuild_process) importFrom(prettyunits,pretty_dt) importFrom(prettyunits,pretty_sec) importFrom(rprojroot,find_package_root_file) importFrom(utils,head) importFrom(utils,tail) importFrom(withr,local_path) importFrom(withr,with_dir) importFrom(withr,with_envvar) importFrom(xopen,xopen) rcmdcheck/LICENSE0000644000176200001440000000011313142421221013165 0ustar liggesusersYEAR: 2016-2017 COPYRIGHT HOLDER: Mango Solutions, Gábor Csárdi, RStudio rcmdcheck/README.md0000644000176200001440000004152414123052353013460 0ustar liggesusersRun R CMD check from R and Capture Results ================ - [rcmdcheck](#rcmdcheck) - [Installation](#installation) - [Usage](#usage) - [License](#license) # rcmdcheck > Run R CMD check from R and Capture Results [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![R build status](https://github.com/r-lib/rcmdcheck/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/rcmdcheck/actions) [![](https://www.r-pkg.org/badges/version/rcmdcheck)](https://www.r-pkg.org/pkg/rcmdcheck) [![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/rcmdcheck)](https://www.r-pkg.org/pkg/rcmdcheck) [![Coverage Status](https://img.shields.io/codecov/c/github/r-lib/rcmdcheck/master.svg)](https://codecov.io/github/r-lib/rcmdcheck?branch=master) Run R CMD check form R programatically, and capture the results of the individual checks. ## Installation ``` r install.packages("rcmdcheck") ``` ## Usage ``` r library(rcmdcheck) rcmdcheck("path/to/R/package") ``` Call `rcmdcheck()` on a source R package `.tar.gz` file, or on a folder containing your R package. Supply `quiet = FALSE` if you want to omit the output. The result of the check is returned, in a list with elements `errors`, `warnings`, and `notes`. Each element is a character vector, and one element of the character vectors is a single failure. ### Programmatic usage `rcmdcheck()` returns an `rcmdcheck` object, which you can query and manipulate. ``` r library(rcmdcheck) chk <- rcmdcheck("tests/testthat/bad1", quiet = TRUE) chk #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────── badpackage 1.0.0 ──── #> Duration: 12.4s #> #> ❯ checking DESCRIPTION meta-information ... WARNING #> Non-standard license specification: #> Public domain #> Standardizable: FALSE #> #> 0 errors ✔ | 1 warning ✖ | 0 notes ✔ ``` `check_details()` turns the check results into a simple lists with the following information currently: ``` r names(check_details(chk)) #> [1] "package" "version" "notes" "warnings" "errors" #> [6] "platform" "checkdir" "install_out" "description" "session_info" #> [11] "cran" "bioc" ``` - `package`: Package name. - `version`: Package version number. - `notes`: Character vector of check `NOTE`s. - `warnings`: Character vector of check `WARNING`s. - `errors`: Character vector of check `ERROR`s. - `platform`: Platform, e.g. `x86_64-apple-darwin15.6.0`. - `checkdir`: Check directory. - `install_out`: Output of the package installation. - `description`: The text of the `DESCRIPTION` file. - `session_info`: A `sessioninfo::session_info` object, session information from within the check process. - `cran`: Flag, whether this is a CRAN package. (Based on the `Repository` field in `DESCRIPTION`, which is typically only set for published CRAN packages.) - `bioc`: Flag, whether this is a Bioconductor package, based on the presence of the `biocViews` field in `DESCRIPTION`. Note that if the check results were parsed from a file, some of these fields might be missing (`NULL`), as we don’t have access to the original `DESCRIPTION`, the installation output, etc. ### Parsing check output `parse_check()` parses check output from a file, `parse_check_url()` parses check output from a URL. ### CRAN checks rcmdcheck has a functions to access CRAN’s package check results. `cran_check_flavours()` downloads the names of the CRAN platforms: ``` r cran_check_flavours() #> [1] "r-devel-linux-x86_64-debian-clang" "r-devel-linux-x86_64-debian-gcc" #> [3] "r-devel-linux-x86_64-fedora-clang" "r-devel-linux-x86_64-fedora-gcc" #> [5] "r-devel-windows-x86_64" "r-patched-linux-x86_64" #> [7] "r-patched-solaris-x86" "r-release-linux-x86_64" #> [9] "r-release-macos-arm64" "r-release-macos-x86_64" #> [11] "r-release-windows-ix86+x86_64" "r-oldrel-macos-x86_64" #> [13] "r-oldrel-windows-ix86+x86_64" ``` `cran_check_results()` loads and parses all check results for a package. ``` r cran_check_results("igraph") #> $`r-devel-linux-x86_64-debian-clang` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking top-level files ... WARNING #> Output from running autoreconf: #> configure.ac:71: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:71: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:71: the top level #> configure.ac:110: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:110: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:110: the top level #> configure.ac:127: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:127: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:127: the top level #> #> 0 errors ✔ | 1 warning ✖ | 0 notes ✔ #> #> $`r-devel-linux-x86_64-debian-gcc` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking top-level files ... WARNING #> Output from running autoreconf: #> configure.ac:71: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:71: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:71: the top level #> configure.ac:110: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:110: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:110: the top level #> configure.ac:127: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:127: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:127: the top level #> #> 0 errors ✔ | 1 warning ✖ | 0 notes ✔ #> #> $`r-devel-linux-x86_64-fedora-clang` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking installed package size ... NOTE #> installed size is 16.9Mb #> sub-directories of 1Mb or more: #> R 1.4Mb #> help 1.1Mb #> libs 14.0Mb #> #> 0 errors ✔ | 0 warnings ✔ | 1 note ✖ #> #> $`r-devel-linux-x86_64-fedora-gcc` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ #> #> $`r-devel-windows-x86_64` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking installed package size ... NOTE #> installed size is 9.8Mb #> sub-directories of 1Mb or more: #> R 1.4Mb #> help 1.1Mb #> libs 6.9Mb #> #> 0 errors ✔ | 0 warnings ✔ | 1 note ✖ #> #> $`r-devel-windows-x86_64-gcc10-UCRT` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking whether package 'igraph' can be installed ... ERROR #> See below... #> #> ❯ checking package dependencies ... NOTE #> Package suggested but not available for checking: 'rgl' #> #> ── Install failure ─────────────────────────────────────────────────────────────────────────────────────────────────────── #> #> <00install.out file does not exist> #> 1 error ✖ | 0 warnings ✔ | 1 note ✖ #> #> $`r-patched-linux-x86_64` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking top-level files ... WARNING #> Output from running autoreconf: #> configure.ac:71: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:71: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:71: the top level #> configure.ac:110: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:110: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:110: the top level #> configure.ac:127: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:127: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:127: the top level #> #> 0 errors ✔ | 1 warning ✖ | 0 notes ✔ #> #> $`r-patched-solaris-x86` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking installed package size ... NOTE #> installed size is 9.6Mb #> sub-directories of 1Mb or more: #> R 1.5Mb #> help 1.2Mb #> libs 6.5Mb #> #> 0 errors ✔ | 0 warnings ✔ | 1 note ✖ #> #> $`r-release-linux-x86_64` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking top-level files ... WARNING #> Output from running autoreconf: #> configure.ac:71: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:71: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:71: the top level #> configure.ac:110: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:110: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:110: the top level #> configure.ac:127: warning: The macro `AC_HELP_STRING' is obsolete. #> configure.ac:127: You should run autoupdate. #> ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... #> configure.ac:127: the top level #> #> 0 errors ✔ | 1 warning ✖ | 0 notes ✔ #> #> $`r-release-macos-arm64` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking installed package size ... NOTE #> installed size is 23.7Mb #> sub-directories of 1Mb or more: #> R 2.0Mb #> help 1.1Mb #> libs 20.0Mb #> #> 0 errors ✔ | 0 warnings ✔ | 1 note ✖ #> #> $`r-release-macos-x86_64` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking installed package size ... NOTE #> installed size is 21.2Mb #> sub-directories of 1Mb or more: #> R 1.4Mb #> help 1.1Mb #> libs 18.3Mb #> #> 0 errors ✔ | 0 warnings ✔ | 1 note ✖ #> #> $`r-release-windows-ix86+x86_64` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking installed package size ... NOTE #> installed size is 17.1Mb #> sub-directories of 1Mb or more: #> R 1.4Mb #> help 1.1Mb #> libs 14.2Mb #> #> 0 errors ✔ | 0 warnings ✔ | 1 note ✖ #> #> $`r-oldrel-macos-x86_64` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking installed package size ... NOTE #> installed size is 21.2Mb #> sub-directories of 1Mb or more: #> R 1.4Mb #> help 1.1Mb #> libs 18.3Mb #> #> 0 errors ✔ | 0 warnings ✔ | 1 note ✖ #> #> $`r-oldrel-windows-ix86+x86_64` #> ── R CMD check results ───────────────────────────────────────────────────────────────────────────────── igraph 1.2.6 ──── #> Duration: 0ms #> #> ❯ checking installed package size ... NOTE #> installed size is 17.1Mb #> sub-directories of 1Mb or more: #> R 1.4Mb #> help 1.1Mb #> libs 14.2Mb #> #> 0 errors ✔ | 0 warnings ✔ | 1 note ✖ #> #> attr(,"package") #> [1] "igraph" #> attr(,"class") #> [1] "rmcdcheck_cran_results" ``` ### Comparing checks `compare_checks()` can compare two or more `rcmdcheck` objects. `compare_to_cran()` compares an `rcmdcheck` object to the CRAN checks of the same package: ``` r chk <- rcmdcheck(quiet = TRUE) compare_to_cran(chk) #> ── R CMD check comparison ────────────────────────────────────────────────────────────── rcmdcheck 1.3.3 / 1.3.3.9000 ──── #> Status: OK #> #> ── Fixed #> #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE #> ✔ checking LazyData ... NOTE ``` ### Background processes `rcmdcheck_process` is a `processx::process` class, that can run `R CMD check` in the background. You can also use this to run multiple checks concurrently. `processx::process` methods can be used to poll or manipulate the check processes. ``` r chkpx <- rcmdcheck_process$new() chkpx #> PROCESS 'R', running, pid 82576. ``` ``` r chkpx$wait() chkpx$parse_results() #> ── R CMD check results ───────────────────────────────────────────────────────────────────────── rcmdcheck 1.3.3.9000 ──── #> Duration: 23.6s #> #> 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ ``` ## License MIT © Mango Solutions, Gábor Csárdi, RStudio rcmdcheck/man/0000755000176200001440000000000014123052257012751 5ustar liggesusersrcmdcheck/man/rcmdcheck-config.Rd0000644000176200001440000001076014122343700016425 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/options.R \name{rcmdcheck-config} \alias{rcmdcheck-config} \title{rcmdcheck configuration} \description{ Options take precedence over environment variables. E.g. if both the \code{RCMDCHECK_NUM_COLORS} environment variables and the \code{rcmdcheck.num_colors} option are set, then the latter is used. } \details{ rcmdcheck uses the cli package for much of its output, so you can configure the output via cli, see \link[cli:cli-config]{cli::cli-config}. Package configration is defined in the \code{DESCRIPTION} file of the checked package. E.g.:\preformatted{Config/build/clean-inst-doc: FALSE } } \section{Environment variables}{ \itemize{ \item \code{R_PROFILE_USER}: standard R environment variable to configure the path to the user level R profile. See \link[base:Startup]{base::R_PROFILE_USER}. \item \code{RCMDCHECK_BASE_URL}: URL to the root of the CRAN check web page. You can use this to select an alternative CRAN mirror. Defaults to \verb{https://cran.r-project.org/web/checks/}. \item \code{RCMDCHECK_DETAILS_URL}: URL to the root of the CRAN check output page. Defaults to \verb{https://www.r-project.org/nosvn/R.check/}. \item \code{RCMDCHECK_ERROR_ON}: the default value for the \code{error_on} argument of \code{\link[=rcmdcheck]{rcmdcheck()}}. \item \code{RCMDCHECK_FLAVOURS_URL} URL to the CRAN check flavours page. You can use this to select an alternative CRAN mirror. Defaults to \verb{https://cran.r-project.org/web/checks/check_flavors.html}. \item \code{RCMDCHECK_NUM_COLORS}: the number of ANSI colors to use in the output. It can be used to override the number of colors detected or configured by the cli package. See \code{\link[cli:num_ansi_colors]{cli::num_ansi_colors()}}. This configuration is only used for the output of rcmdcheck and it does not affect the examples and test cases (and other code) of the checked package. It not set, then the default of cli is uesed. The corresponding option is \code{rcmdcheck.num_colors}. \item \code{RCMDCHECK_TIMESTAMP_LIMIT}: lower limit is seconds, above which rcmdcheck adds time stamps to the individual check steps. It may be fractional. Defaults to 1/3 of a second. The corresponding option is \code{rcmdcheck.timestamp_limit}. \item \code{RCMDCHECK_USE_RSTUDIO_PANDOC}: Flag (\code{true} or \code{false}). If \code{true}, then rcmdcheck \emph{always} puts RStudio's pandoc (if available) on the path. If \code{false}, then it \emph{never} does that. If not set, or set to a different value, then pandoc is put on the path only if it is not already available. RStudio's pandoc is detected via an \code{RSTUDIO_PANDOC} environment variable. \item \code{RCMDCHECK_LOAD_CHECK_ENV}: you can use this environment variable suppress loading environment variables from the \code{tools/check.env} file. See \code{\link[=rcmdcheck]{rcmdcheck()}} for details. \item \code{RSTUDIO_PANDOC}: if set, rcmdcheck adds this environment variable to the PATH if pandoc is not on the PATH already. It is usually set in RStudio. See also the \code{RCMDCHECK_USE_RSTUDIO_PANDOC} environment variable. } } \section{Options}{ \itemize{ \item \code{rcmdcheck.num_colors}: the number of ANSI colors to use in the output. It can be used to override the number of colors detected or configured by the cli package. See \code{\link[cli:num_ansi_colors]{cli::num_ansi_colors()}}. This configuration is only used for the output of rcmdcheck and it does not affect the examples and test cases (and other code) of the checked package. It not set, then the default of cli is uesed. The corresponding environment variable is \code{RCMDCHECK_NUM_COLORS}. \item \code{rcmdcheck.test_output}: Flag (\code{TRUE} or \code{FALSE}), whether \code{\link[=print.rcmdcheck]{print.rcmdcheck()}} should print the full test output if there are no test failures. If some tests fail, then only the failures are printed, independently of this option. \item \code{rcmdcheck.timestamp_limit}: lower limit is seconds, above which rcmdcheck adds time stamps to the individual check steps. It may be fractional. Defaults to 1/3 of a second. The corresponding environment variable is \code{RCMDCHECK_TIMESTAMP_LIMIT}. } } \section{Package configuration:}{ \itemize{ \item \code{Config/build/clean-inst-doc}: Flag (\code{TRUE} or \code{FALSE}) to specify if the \code{inst/doc} directory should be cleaned up when building a package directory. If not specified, then \code{NULL} is used. See the \code{clean_doc} option of \code{\link[pkgbuild:build]{pkgbuild::build()}} for more details. } } rcmdcheck/man/print.rcmdcheck.Rd0000644000176200001440000000121214120347676016323 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/print.R \name{print.rcmdcheck} \alias{print.rcmdcheck} \title{Print R CMD check results} \usage{ \method{print}{rcmdcheck}( x, header = TRUE, test_output = getOption("rcmdcheck.test_output", FALSE), ... ) } \arguments{ \item{x}{Check result object to print.} \item{header}{Whether to print a header.} \item{test_output}{if \code{TRUE}, include the test output in the results, if there are no test failures. If some tests fail, then only the failures are printed.} \item{...}{Additional arguments, currently ignored.} } \description{ Print R CMD check results } rcmdcheck/man/compare_checks.Rd0000644000176200001440000000156614120347676016227 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compare.R \name{compare_checks} \alias{compare_checks} \title{Compare a set of check results to another check result} \usage{ compare_checks(old, new) } \arguments{ \item{old}{A check result, or a list of check results.} \item{new}{A check result.} } \value{ An \code{rcmdcheck_comparison} object with fields: \itemize{ \item \code{package}: the name of the package, string, \item \code{versions}: package versions, length two character, \item \code{status}: comparison status, see below, \item \code{old}: list of \code{rcmdcheck} objects the old check(s), \item \code{new}: \code{rcmdcheck} object, the new check, \item \code{cmp}: } } \description{ Compare a set of check results to another check result } \seealso{ Other check comparisons: \code{\link{compare_to_cran}()} } \concept{check comparisons} rcmdcheck/man/print.rcmdcheck_comparison.Rd0000644000176200001440000000122113146514764020556 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/comparison.R \name{print.rcmdcheck_comparison} \alias{print.rcmdcheck_comparison} \title{Print R CMD check result comparisons} \usage{ \method{print}{rcmdcheck_comparison}(x, header = TRUE, ...) } \arguments{ \item{x}{R CMD check result comparison object.} \item{header}{Whether to print the header. You can suppress the header if you want to use the printout as part of another object's printout.} \item{...}{Additional arguments, currently ignored.} } \description{ See \code{\link[=compare_checks]{compare_checks()}} and \code{\link[=compare_to_cran]{compare_to_cran()}}. } rcmdcheck/man/parse_check.Rd0000644000176200001440000000141314120347676015517 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/parse.R \name{parse_check} \alias{parse_check} \title{Parse \code{R CMD check} results from a file or string} \usage{ parse_check(file = NULL, text = NULL, ...) } \arguments{ \item{file}{The \code{00check.log} file, or a directory that contains that file. It can also be a connection object.} \item{text}{The contents of a \code{00check.log} file.} \item{...}{Other arguments passed onto the constructor. Used for testing.} } \value{ An \code{rcmdcheck} object, the check results. } \description{ At most one of \code{file} or \code{text} can be given. If both are \code{NULL}, then the current working directory is checked for a \code{00check.log} file. } \seealso{ \code{\link{parse_check_url}} } rcmdcheck/man/data_frame.Rd0000644000176200001440000000124014120347676015331 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{data_frame} \alias{data_frame} \title{Alternative to data.frame} \usage{ data_frame(..., stringsAsFactors = FALSE) } \arguments{ \item{...}{Named data frame columns, or data frames.} \item{stringsAsFactors}{Just leave it on \code{FALSE}. \verb{:)}} } \value{ Data frame. } \description{ \itemize{ \item Sets stringsAsFactors to FALSE by default \item If any columns have zero length, the result will have zero rows. \item If a column is a scalar, then it will be recycled. \item Non-matching number of rows gives an error, except for lengths zero and one. } } \keyword{internal} rcmdcheck/man/parse_check_url.Rd0000644000176200001440000000107114120347676016401 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/parse.R \name{parse_check_url} \alias{parse_check_url} \title{Shorthand to parse R CMD check results from a URL} \usage{ parse_check_url(url, quiet = FALSE) } \arguments{ \item{url}{URL to parse the results from. Note that it should not contain HTML markup, just the text output.} \item{quiet}{Passed to \code{download.file}.} } \value{ An \code{rcmdcheck} object, the check results. } \description{ Shorthand to parse R CMD check results from a URL } \seealso{ \code{\link{parse_check}} } rcmdcheck/man/rcmdcheck.Rd0000644000176200001440000001243614123052470015166 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package.R \docType{package} \name{rcmdcheck} \alias{rcmdcheck} \title{Run R CMD check from R and Capture Results} \usage{ rcmdcheck( path = ".", quiet = FALSE, args = character(), build_args = character(), check_dir = NULL, libpath = .libPaths(), repos = getOption("repos"), timeout = Inf, error_on = Sys.getenv("RCMDCHECK_ERROR_ON", c("never", "error", "warning", "note")[1]), env = character() ) } \arguments{ \item{path}{Path to a package tarball or a directory.} \item{quiet}{Whether to print check output during checking.} \item{args}{Character vector of arguments to pass to \verb{R CMD check}. Pass each argument as a single element of this character vector (do not use spaces to delimit arguments like you would in the shell). For example, to skip running of examples and tests, use \code{args = c("--no-examples", "--no-tests")} and not \code{args = "--no-examples --no-tests"}. (Note that instead of the \code{--output} option you should use the \code{check_dir} argument, because \code{--output} cannot deal with spaces and other special characters on Windows.)} \item{build_args}{Character vector of arguments to pass to \verb{R CMD build}. Pass each argument as a single element of this character vector (do not use spaces to delimit arguments like you would in the shell). For example, \code{build_args = c("--force", "--keep-empty-dirs")} is a correct usage and \code{build_args = "--force --keep-empty-dirs"} is incorrect.} \item{check_dir}{Path to a directory where the check is performed. If this is not \code{NULL}, then the a temporary directory is used, that is cleaned up when the returned object is garbage collected.} \item{libpath}{The library path to set for the check. The default uses the current library path.} \item{repos}{The \code{repos} option to set for the check. This is needed for cyclic dependency checks if you use the \code{--as-cran} argument. The default uses the current value.} \item{timeout}{Timeout for the check, in seconds, or as a \link[base:difftime]{base::difftime} object. If it is not finished before this, it will be killed. \code{Inf} means no timeout. If the check is timed out, that is added as an extra error to the result object.} \item{error_on}{Whether to throw an error on \verb{R CMD check} failures. Note that the check is always completed (unless a timeout happens), and the error is only thrown after completion. If \code{"never"}, then no errors are thrown. If \code{"error"}, then only \code{ERROR} failures generate errors. If \code{"warning"}, then \code{WARNING} failures generate errors as well. If \code{"note"}, then any check failure generated an error. Its default can be modified with the \code{RCMDCHECK_ERROR_ON} environment variable. If that is not set, then \code{"never"} is used.} \item{env}{A named character vector, extra environment variables to set in the check process.} } \value{ An S3 object (list) with fields \code{errors}, \code{warnings} and \code{notes}. These are all character vectors containing the output for the failed check. } \description{ Run R CMD check from R programmatically, and capture the results of the individual checks. Runs \verb{R CMD check} as an external command, and parses its output and returns the check failures. } \details{ See \link{rcmdcheck_process} if you need to run \verb{R CMD check} in a background process. } \section{Turning off package checks}{ Sometimes it is useful to programmatically turn off some checks that may report check NOTEs. rcmdcehck provides two ways to do this. First, you may declare in \code{DESCRIPTION} that you don't want to see NOTEs that are accepted on CRAN, with this entry:\preformatted{Config/rcmdcheck/ignore-inconsequential-notes: true } Currently, this will make rcmdcheck ignore the following notes: \itemize{ \item report large package sizes (\verb{_R_CHECK_PKG_SIZES_ = FALSE}), \item check cross-references in Rd files (\verb{_R_CHECK_RD_XREFS_ = FALSE}), \item NOTE if package requires GNU make (\verb{_R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_ = FALSE}), \item report marked non-ASCII strings in datasets (\verb{_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_ = TRUE}). } The second way is more flexible, and lets you turn off individual checks via setting environment variables. You may provide a \code{tools/check.env} \emph{environment file} in your package with the list of environment variable settings that rcmdcheck will automatically use when checking the package. See \link{Startup} for the format of this file. Here is an example \code{tools/check.env} file:\preformatted{# Report if package size is larger than 10 megabytes _R_CHECK_PKG_SIZES_THRESHOLD_=10 # Do not check Rd cross references _R_CHECK_RD_XREFS_=false # Do not report if package requires GNU make _R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_=false # Do not check non-ASCII strings in datasets _R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_=true } See the \href{https://cran.r-project.org/doc/manuals/r-devel/R-ints.html}{"R internals" manual} and the \href{https://github.com/wch/r-source}{R source code} for the environment variables that control the checks. Note that \code{Config/rcmdcheck/ignore-inconsequential-notes} and the \code{check.env} file are only supported by rcmdcheck, and running \verb{R CMD check} from a shell (or GUI) will not use them. } rcmdcheck/man/cran_check_results.Rd0000644000176200001440000000122214120347676017107 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cran.R \name{cran_check_results} \alias{cran_check_results} \title{Download and parse R CMD check results from CRAN} \usage{ cran_check_results( package, flavours = cran_check_flavours(package), quiet = FALSE ) } \arguments{ \item{package}{Name of a single package to download the checks for.} \item{flavours}{CRAN check flavours to use. Defaults to all flavours that were used to check the package.} \item{quiet}{Whether to omit the download progress bars.} } \value{ A list of \code{rcmdcheck} objects. } \description{ Download and parse R CMD check results from CRAN } rcmdcheck/man/check_details.Rd0000644000176200001440000000276514120347676016045 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/api.R \name{check_details} \alias{check_details} \title{Query R CMD check results and parameters} \usage{ check_details(check) } \arguments{ \item{check}{A check result.} } \value{ A named list with elements: \itemize{ \item \code{package}: package name. \item \code{version}: package version. \item \code{rversion}: R version. \item \code{notes}: character vector of check NOTEs, each NOTE is an element. \item \code{warnings}: character vector of check WARNINGs, each WARNING is an element. \item \code{errors}: character vector of check ERRORs, each ERROR is an element. A check timeout adds an ERROR to this vector. \item \code{platform}: check platform \item \code{checkdir}: check directory. \item \code{install_out}: the output of the installation, contents of the \verb{00install.out} file. A single string. \item \code{description}: the contents of the DESCRIPTION file of the package. A single string. \item \code{session_info}: the output of \code{\link[sessioninfo:session_info]{sessioninfo::session_info()}}, from the R session performing the checks. \item \code{checkdir}: the path to the check directory, if it hasn't been cleaned up yet, or \code{NA}. The check directory is automatically cleaned up, when the check object is deleted (garbage collected). \item \code{cran}: whether it is a CRAN packaged package. \item \code{bioc}: whether it is a BioConductor package. } } \description{ Query R CMD check results and parameters } rcmdcheck/man/rcmdcheck_process.Rd0000644000176200001440000000452414123052257016726 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/background.R \name{rcmdcheck_process} \alias{rcmdcheck_process} \title{Run an \verb{R CMD check} process in the background} \description{ rcmdcheck_process is an R6 class, that extends the \link[callr:rcmd_process]{callr::rcmd_process} class (which in turn extends \link[processx:process]{processx::process}. } \section{Usage}{ \preformatted{cp <- rcmdcheck_process$new(path = ".", args = character(), build_args = character(), check_dir = NULL, libpath = .libPaths(), repos = getOption("repos")) cp$parse_results() } Other methods are inherited from \link[callr:rcmd_process]{callr::rcmd_process} and \link[processx:process]{processx::process}. Note that you calling the \code{get_output_connection} and \code{get_error_connection} method on this is not a good idea, because then the stdout and/or stderr of the process will not be collected for \code{parse_results()}. You can still use the \code{read_output_lines()} and \code{read_error_lines()} methods to read the standard output and error, \code{parse_results()} is not affected by that. } \section{Arguments}{ \itemize{ \item \code{cp}: A new rcmdcheck_process object. \item \code{path}: Path to a package tree or a package archive file. This is the package to check. \item \code{args}: Command line arguments to \verb{R CMD check}. \item \code{build_args}: Command line arguments to \verb{R CMD build}. \item \code{check_dir}: Directory for the results. \item \code{libpath}: The library path to set for the check. \item \code{repos}: The \code{repos} option to set for the check. This is needed for cyclic dependency checks if you use the \code{--as-cran} argument. The default uses the current value. \item \code{env}: A named character vector, extra environment variables to set in the check process. } } \section{Details}{ Most methods are inherited from \link[callr:rcmd_process]{callr::rcmd_process} and \link[processx:process]{processx::process}. \code{cp$parse_results()} parses the results, and returns an S3 object with fields \code{errors}, \code{warnnigs} and \code{notes}, just like \code{\link[=rcmdcheck]{rcmdcheck()}}. It is an error to call it before the process has finished. Use the \code{wait()} method to wait for the check to finish, or the \code{is_alive()} method to check if it is still running. } rcmdcheck/man/cran_check_flavours.Rd0000644000176200001440000000125614120347676017256 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cran.R \name{cran_check_flavours} \alias{cran_check_flavours} \title{Download and show all CRAN check flavour platforms} \usage{ cran_check_flavours(package = NULL) } \arguments{ \item{package}{CRAN package name or \code{NULL}.} } \value{ Character vector of platform ids. } \description{ If the \code{package} argument is \code{NULL}, then all current platforms are downloaded. If the \code{package} argument is specified, then all flavours used for the latest package checks for that package, are downloaded and returned. } \examples{ \dontrun{ cran_check_flavours() cran_check_flavours("simplegraph") } } rcmdcheck/man/myrep.Rd0000644000176200001440000000057213142421221014367 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{myrep} \alias{myrep} \title{Recycle a vector or a data frame (rows)} \usage{ myrep(x, len) } \arguments{ \item{x}{Vector or data frame to replicate. Must be length 0, 1, or len.} \item{len}{Expected length.} } \description{ Recycle a vector or a data frame (rows) } \keyword{internal} rcmdcheck/man/compare_to_cran.Rd0000644000176200001440000000113114120347676016400 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compare.R \name{compare_to_cran} \alias{compare_to_cran} \title{Compare a check result to CRAN check results} \usage{ compare_to_cran(check, flavours = cran_check_flavours(check$package)) } \arguments{ \item{check}{A check result.} \item{flavours}{CRAN check flavour(s) to use. By default all platforms are used.} } \value{ An \code{rmdcheck_comparison} object. } \description{ Compare a check result to CRAN check results } \seealso{ Other check comparisons: \code{\link{compare_checks}()} } \concept{check comparisons} rcmdcheck/man/xopen.rcmdcheck.Rd0000644000176200001440000000123013447166631016321 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xopen.R \name{xopen.rcmdcheck} \alias{xopen.rcmdcheck} \title{Open the check directory in a file browser window} \usage{ \method{xopen}{rcmdcheck}(target, app = NULL, quiet = FALSE, ...) } \arguments{ \item{target}{\code{rcmdcheck()} result.} \item{app}{Specify the app to open \code{target} with, and its arguments, in a character vector. Note that app names are platform dependent.} \item{quiet}{Whether to echo the command to the screen, before running it.} \item{...}{Additional arguments, not used currently.} } \description{ Open the check directory in a file browser window } rcmdcheck/DESCRIPTION0000644000176200001440000000220214124357312013701 0ustar liggesusersPackage: rcmdcheck Title: Run 'R CMD check' from 'R' and Capture Results Version: 1.4.0 Authors@R: person(given = "Gábor", family = "Csárdi", role = c("cre", "aut"), email = "csardi.gabor@gmail.com") Description: Run 'R CMD check' from 'R' and capture the results of the individual checks. Supports running checks in the background, timeouts, pretty printing and comparing check results. License: MIT + file LICENSE URL: https://r-lib.github.io/rcmdcheck/, https://github.com/r-Lib/rcmdcheck#readme BugReports: https://github.com/r-Lib/rcmdcheck/issues Imports: callr (>= 3.1.1.9000), cli (>= 3.0.0), curl, desc (>= 1.2.0), digest, pkgbuild, prettyunits, R6, rprojroot, sessioninfo (>= 1.1.1), utils, withr, xopen Suggests: covr, knitr, mockery, processx, ps, rmarkdown, svglite, testthat, webfakes Encoding: UTF-8 RoxygenNote: 7.1.2 Config/testthat/edition: 3 NeedsCompilation: no Packaged: 2021-09-23 11:13:42 UTC; gaborcsardi Author: Gábor Csárdi [cre, aut] Maintainer: Gábor Csárdi Repository: CRAN Date/Publication: 2021-09-27 15:10:02 UTC rcmdcheck/tests/0000755000176200001440000000000014122606412013335 5ustar liggesusersrcmdcheck/tests/testthat/0000755000176200001440000000000014124357312015201 5ustar liggesusersrcmdcheck/tests/testthat/REDCapR-fail.log0000644000176200001440000000640313146514764020011 0ustar liggesusers* using log directory ‘/Users/hadley/Documents/web/httr/revdep/checks/REDCapR/new/REDCapR.Rcheck’ * using R version 3.4.1 (2017-06-30) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * checking for file ‘REDCapR/DESCRIPTION’ ... OK * this is package ‘REDCapR’ version ‘0.9.8’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘REDCapR’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... ERROR Running ‘test-all.R’ Running the tests in ‘tests/test-all.R’ failed. Last 13 lines of output: returned_object$success isn't true. testthat results ================================================================ OK: 563 SKIPPED: 0 FAILED: 7 1. Failure: NameComesFromREDCap (@test-file-oneshot.R#15) 2. Error: NameComesFromREDCap (@test-file-oneshot.R#30) 3. Failure: Write Batch -Insert (@test-write-batch.R#16) 4. Failure: Write Batch -Insert (@test-write-batch.R#52) 5. Failure: Write Batch -Insert (@test-write-batch.R#54) 6. Failure: Write Batch -Insert (@test-write-batch.R#57) 7. Failure: Write Batch -Insert (@test-write-batch.R#58) Error: testthat unit tests failed Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking running R code from vignettes ... NONE * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: 1 ERROR rcmdcheck/tests/testthat/minimal-ee.log0000644000176200001440000000055714117731705017734 0ustar liggesusers* using log directory ‘.’ * using R version 3.4.1 (2017-06-30) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * checking for file 'minimal/DESCRIPTION' ... OK * this is package ‘minimal’ version ‘1.0.0’ * check 1 ... ERROR Message 1 * check 2 ... OK * check 3 ... OK * check 4 ... ERROR Message 4 * check 5 ... OK rcmdcheck/tests/testthat/minimal-ok.log0000644000176200001440000000044014117731705017743 0ustar liggesusers* using log directory ‘.’ * using R version 3.4.1 (2017-06-30) * this is package ‘minimal’ version ‘1.0.0’ * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * check 1 ... OK * check 2 ... OK * check 3 ... OK * check 4 ... OK * check 5 ... OK rcmdcheck/tests/testthat/test-comparison.R0000644000176200001440000000122014120347676020456 0ustar liggesusers test_that("basic metadata stored in comparison object", { cf <- compare_check_files(test_path("REDCapR-ok.log"), test_path("REDCapR-fail.log")) expect_equal(cf$package, "REDCapR") expect_equal(cf$versions, c("0.9.8", "0.9.8")) }) test_that("status correctly computed when both checks are ok", { cf <- compare_check_files(test_path("minimal-ok.log"), test_path("minimal-ok.log")) expect_equal(cf$status, "+") }) cli::test_that_cli("print message displays informative output", { skip_on_cran() cf <- compare_check_files( test_path("minimal-ee.log"), test_path("minimal-ewn.log") ) expect_snapshot( print(summary(cf)) ) }) rcmdcheck/tests/testthat/minimal-ewn.log0000644000176200001440000000057714117731705020136 0ustar liggesusers* using log directory ‘.’ * using R version 3.4.1 (2017-06-30) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * checking for file 'minimal/DESCRIPTION' ... OK * this is package ‘minimal’ version ‘1.0.0’ * check 1 ... ERROR Message 1 * check 2 ... WARNING Message 2 * check 3 ... NOTE Message 3 * check 4 ... OK * check 5 ... OK rcmdcheck/tests/testthat/fixtures/0000755000176200001440000000000014122660375017056 5ustar liggesusersrcmdcheck/tests/testthat/fixtures/win.rds0000644000176200001440000000533114117731705020367 0ustar liggesusersZysI7B UPU<,3c>"6S&6'$㙖59c? LOwk4E~_qowoܻ7>ߏA%8%Xv@бFݹp|p:4mt-sF+uu2msmc&Ah:nlV&sLj~vP_v6sPHD93D#8 zQ$Zr)pId(BkdX 3`F.~PEnn0/+|MxLON@4X ^d  8F ߰XKX zcG3@wYTO錽Ls?9(YXjhUNӒ*C~!C:E``U0@@.0 VaނyrEŗ#mjm3;{!6*vJcxLcϤB1+Ub_z(H6cf7hv>)|'| xQ˪M,tOW'iU:A_WBʋpf i߶%5dmj-qG8 .Gbwmj&W2dt|]4md/> tuHߋӳ,K?LjgFWuJvPJMpU$ \FGgzf4 [šTIW鑟y5HP%X@*,EQcwu1=^ *Nc# .jJYkHk8׸"pF|Gdw- Y>yԜpbAif)]W##efo!] }No\Gpo_8=oڲyvA˂]wyER(+Q`z_mF.̆.TrW^I Fn3i.rqu\{/ΠOϰX/ iw o` ʞU;5VMww<K$pN`)CLR{RMVq *2gGQc#98=-/+nMs&8Z~ϰpaK̭!rVTL=f% Hn*,`0ZϱN җJ[vR9aaN +VgRʎw-MT}+ X\Yܳ[_WwR!bFR4qYvq٫LK /x,F&Q$$dJNœ m8]~B±*¯,n9]!m&͉N2r/VG :vN;=i4ŠH4&U#'+$-sGByQ4Ac0$\3ثɍ/4J:O-襙:B^ bӇ eG*wv qFc,p-Kr,7V+g- _2Bȃ(JMu_6_EA(Ռww,`iF2N,\"JƖNXaêo~ ;\I.r8hN"s1$lUaa仲N:6cJoaVҮF9C^ԕ9k<&s?rߥ_;g)1Vܪ{7&__;dj.A=!Bw1x4~+<ͯc̴x Fru0N{c1yL)R?Ն**w#ʀј8dmY#mdbJK)Y4 B1%Gԇ1*كڷ% 6?=:s)})gQ|ez 0 7Yarcmdcheck/tests/testthat/fixtures/checks/0000755000176200001440000000000014122660375020316 5ustar liggesusersrcmdcheck/tests/testthat/fixtures/checks/r-devel-linux-x86_64-debian-clang/0000755000176200001440000000000014120347676026253 5ustar liggesusersrcmdcheck/tests/testthat/fixtures/checks/r-devel-linux-x86_64-debian-clang/rcmdcheck-00check.txt0000644000176200001440000000503514120347676032155 0ustar liggesusers* using log directory '/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/rcmdcheck.Rcheck' * using R Under development (unstable) (2021-06-27 r80567) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: ISO8859-15 * checking for file 'rcmdcheck/DESCRIPTION' ... OK * this is package 'rcmdcheck' version '1.3.3' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking serialization versions ... OK * checking whether package 'rcmdcheck' can be installed ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [7s/10s] OK * checking Rd files ... [0s/0s] OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking LazyData ... NOTE 'LazyData' is specified without a 'data' directory * checking examples ... [1s/1s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [2s/3s] OK Running 'testthat.R' [2s/3s] * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * DONE Status: 1 NOTE rcmdcheck/tests/testthat/fixtures/checks/check_flavors.html0000644000176200001440000001233414120347676024024 0ustar liggesusers CRAN Package Check Flavors

CRAN Package Check Flavors

Last updated on 2021-07-02 08:49:14 CEST.

Systems used for CRAN package checking.

Flavor R Version OS Type CPU Type OS Info CPU Info Compilers
r-devel-linux-x86_64-debian-clang r-devel Linux x86_64 Debian GNU/Linux testing 2x 8-core Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz clang version 12.0.1-+rc1-1~exp1; GNU Fortran (GCC) 10.2.1 (Debian 10.2.1-6)
r-devel-linux-x86_64-debian-gcc r-devel Linux x86_64 Debian GNU/Linux testing 2x 8-core Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz GCC 10.2.1 (Debian 10.2.1-6)
r-devel-linux-x86_64-fedora-clang r-devel Linux x86_64 Fedora 32 2x 6-core Intel Xeon E5-2440 0 @ 2.40GHz clang version 12.0.0; GNU Fortran 10.2 Details
r-devel-linux-x86_64-fedora-gcc r-devel Linux x86_64 Fedora 32 2x 6-core Intel Xeon E5-2440 0 @ 2.40GHz GCC 10.3 Details
r-devel-windows-x86_64 r-devel Windows x86_64 Windows Server 2008 (64-bit) 2x Intel Xeon E5-2670 (8 core) @ 2.6GHz GCC 8.3.0 (built by MSYS2, MinGW-W64 project)
r-devel-windows-x86_64-gcc10-UCRT r-devel Windows x86_64 Windows Server 2016 (64-bit) 2x Intel Xeon Gold 5118 (12 core) @ 2.3GHz GCC 10.2.0 (built by MXE, MinGW-W64 project) Details
r-patched-linux-x86_64 r-patched Linux x86_64 Debian GNU/Linux testing 2x 8-core Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz GCC 10.2.1 (Debian 10.2.1-6)
r-patched-solaris-x86 r-patched Solaris x86 Solaris 10 8x Opteron 8218 (dual core) @ 2.6 GHz Oracle Developer Studio 12.6 Details
r-release-linux-x86_64 r-release Linux x86_64 Debian GNU/Linux testing 2x 8-core Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz GCC 10.2.1 (Debian 10.2.1-6)
r-release-macos-arm64 r-release macOS arm64 macOS 11.2.1 (20D74) Mac mini Apple clang version 12.0.0 (clang-1200.0.32.29); GNU Fortran (GCC) 11.0.0 20201219 (experimental)
r-release-macos-x86_64 r-release macOS x86_64 macOS 10.13.6 (17G11023) Mac mini, 3 GHz Apple LLVM version 10.0.0 (clang-1000.10.44.4); GNU Fortran (GCC) 8.2.0
r-release-windows-ix86+x86_64 r-release Windows ix86+x86_64 Windows Server 2008 (64-bit) 2x Intel Xeon E5-2670 (8 core) @ 2.6GHz GCC 8.3.0 (built by MSYS2, MinGW-W64 project)
r-oldrel-macos-x86_64 r-oldrel macOS x86_64 macOS 10.13.6 (17G11023) Mac mini, 3 GHz Apple LLVM version 10.0.0 (clang-1000.10.44.4); GNU Fortran (GCC) 8.2.0
r-oldrel-windows-ix86+x86_64 r-oldrel Windows ix86+x86_64 Windows Server 2008 (64-bit) 2x Intel Xeon E5-2670 (8 core) @ 2.6GHz GCC 8.3.0 (built by MSYS2, MinGW-W64 project)
rcmdcheck/tests/testthat/fixtures/checks/r-release-windows-ix86+x86_64/0000755000176200001440000000000014120347676025417 5ustar liggesusersrcmdcheck/tests/testthat/fixtures/checks/r-release-windows-ix86+x86_64/rcmdcheck-00check.txt0000644000176200001440000000444614120347676031326 0ustar liggesusers* using log directory 'd:/Rcompile/CRANpkg/local/4.1/rcmdcheck.Rcheck' * using R version 4.1.0 (2021-05-18) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'rcmdcheck/DESCRIPTION' ... OK * this is package 'rcmdcheck' version '1.3.3' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'rcmdcheck' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [5s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking LazyData ... NOTE 'LazyData' is specified without a 'data' directory * checking examples ... [1s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [3s] OK Running 'testthat.R' [2s] * checking PDF version of manual ... OK * DONE Status: 1 NOTE rcmdcheck/tests/testthat/fixtures/checks/comparing2.txt0000644000176200001440000000766314122660375023134 0ustar liggesusers* using log directory '/Users/gaborcsardi/works/ps.Rcheck' * using R version 4.1.0 (2021-05-18) * using platform: x86_64-apple-darwin17.0 (64-bit) * using session charset: UTF-8 * checking for file 'ps/DESCRIPTION' ... OK * this is package 'ps' version '1.6.0.9000' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package 'ps' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in shell scripts ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking compiled code ... OK * checking examples ... OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... Running 'test-1.R' Comparing 'test-1.Rout' to 'test-1.Rout.save' ... OK Running 'test-2.R' Comparing 'test-2.Rout' to 'test-2.Rout.save' ... OK Running 'test.R' Comparing 'test.Rout' to 'test.Rout.save' ...1,4d0 < < < > < > cat("This is the output.\n") 6d1 < > Running 'testthat.R'/Library/Frameworks/R.framework/Versions/4.1/Resources/bin/BATCH: line 60: 84659 Abort trap: 6 ${R_HOME}/bin/R -f ${in} ${opts} ${R_BATCH_OPTIONS} > ${out} 2>&1 ERROR Running the tests in 'tests/testthat.R' failed. Last 13 lines of output: + ## ps does not support this platform + reporter <- "progress" + } > > if (ps_is_supported()) test_check("ps", reporter = reporter) cleanup-reporter: cleanup testthat reporter: ...................................................................................................................................... common: common: .................................................................................................................................................... connections: connections: ................................................................S............S............ finished: process finished: ................................................................................... kill-tree: kill-tree: ............................................... * checking PDF version of manual ... OK * DONE Status: 1 ERROR See '/Users/gaborcsardi/works/ps.Rcheck/00check.log' for details. rcmdcheck/tests/testthat/fixtures/checks/comparing.txt0000644000176200001440000000560614122660375023045 0ustar liggesusers* using log directory '/private/tmp/readr.Rcheck' * using R version 4.1.0 (2021-05-18) * using platform: x86_64-apple-darwin17.0 (64-bit) * using session charset: UTF-8 * checking for file 'readr/DESCRIPTION' ... OK * this is package 'readr' version '2.0.1.9000' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package 'readr' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking R/sysdata.rda ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... Running 'first_edition.R' Running 'second_edition.R' Running 'spelling.R' Comparing 'spelling.Rout' to 'spelling.Rout.save' ...6,8d5 < Potential spelling errors: < WORD FOUND IN < programatically NEWS.md:14 OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking running R code from vignettes ... 'locales.Rmd' using 'UTF-8'... OK 'readr.Rmd' using 'UTF-8'... OK NONE * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: OK rcmdcheck/tests/testthat/fixtures/checks/test-error.txt0000644000176200001440000000650514122660375023173 0ustar liggesusers* using log directory ‘/Users/gaborcsardi/works/ps.Rcheck’ * using R version 4.1.0 (2021-05-18) * using platform: x86_64-apple-darwin17.0 (64-bit) * using session charset: UTF-8 * checking for file ‘ps/DESCRIPTION’ ... OK * this is package ‘ps’ version ‘1.6.0.9000’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘ps’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in shell scripts ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking compiled code ... OK * checking examples ... OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... Running 'testthat.R' ERROR Running the tests in 'tests/testthat.R' failed. Last 13 lines of output: / | 0 | windows / | 0 | winver / | 0 | winver v | 6 | winver == Results ===================================================================== Duration: 13.5 s -- Skipped tests -------------------------------------------------------------- * Needs working IPv6 connection (2) * On CRAN (13) [ FAIL 1 | WARN 0 | SKIP 15 | PASS 367 ] Error: Test failures Execution halted * checking PDF version of manual ... OK * DONE Status: 1 ERROR See ‘/Users/gaborcsardi/works/ps.Rcheck/00check.log’ for details. rcmdcheck/tests/testthat/fixtures/checks/r-devel-linux-x86_64-debian-gcc/0000755000176200001440000000000014120347676025723 5ustar liggesusersrcmdcheck/tests/testthat/fixtures/checks/r-devel-linux-x86_64-debian-gcc/rcmdcheck-00check.txt0000644000176200001440000000506214120347676031625 0ustar liggesusers* using log directory ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/rcmdcheck.Rcheck’ * using R Under development (unstable) (2021-06-27 r80567) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * checking for file ‘rcmdcheck/DESCRIPTION’ ... OK * this is package ‘rcmdcheck’ version ‘1.3.3’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking serialization versions ... OK * checking whether package ‘rcmdcheck’ can be installed ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [6s/11s] OK * checking Rd files ... [0s/1s] OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking LazyData ... NOTE 'LazyData' is specified without a 'data' directory * checking examples ... [1s/1s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... [2s/3s] OK Running ‘testthat.R’ [1s/2s] * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * DONE Status: 1 NOTE rcmdcheck/tests/testthat/fixtures/badenc.fail0000644000176200001440000000206014121400322021104 0ustar liggesusers R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) 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. > library(testthat) > library(ipc) > > test_check("ipc") ... Error: package or namespace load failed for ‘statsDuring startup - Warning messages: 1: package ‘utils’ in options("defaultPackages") was not found 2: package ‘graphics’ in options("defaultPackages") was not found 3: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1 4: package ‘stats’ in options("defaultPackages") was not found ... rcmdcheck/tests/testthat/fixtures/bad-tests.tar.gz0000644000176200001440000000656114117731705022103 0ustar liggesusers\\{sF߿;̑T]K MScc6\HHٯ{%^XK1ͣ{z^\֌5*oU7fU9l( QjTjUS4 =B|л _IWSnK_Q]uUUF]yC;ƑJKn>V'Qw1)*9xETKexb>i,ܐURRʑZ-O\[{7lfYFooF5OsʅJc{-rվ=:jK Iϲ))r~>ӮnoDer=2Ս/X "| P)fpLȡE>_JG3Q#.VY*X&`xtf&b jqo9:PD<HжZe,ʭSKuғSz R_4︒Ml%r6 iƒע0w0}vu%F7|d0ێ? YuU;j4*IGmjYR#hv-g3u6ՙ=^+?ZP 0['AAAtܜvquA=5YKtX. J^]#}ʨgg9[TQ :'芖5jY`K@0zpz| nޡ_6u__ ɣ='-. 1,mtapJp .|6]^hhiKIKj˶F,/P&,7=yٻwK=a+ <} W@6 ]gG=];VćPf+.js]3AH)qzv},KקwgGIKidžvs{}=`9aױy9Îi%LZ 8IjCWzܝ_kS?y/BH+HX4r",mymJxo/`l\3W(l/g*@WKZZ7 p5"}}ςc" ѓh1O2<:+L ! ! 6rFOsS6p35nQFF,>꿏COB #)\g -Yu6諯)1!=<Ən]th#:GW>> 1d< !Ibs$98Y 8ԙ1g^r8(PO$u`J#}Pt79Gq aj9x.fL\SRAK+BLvB xd hD1]",<(EIV}5 /66pI.'~EH9k6kV"h^],^GDDIXӄk |9mo_`M^([u.NUv3{VY ;yF.QD8C _Lˠ٦Ep`=<̝?y'Aa> /.o^ܒOvzsGFv{< |kЂYu  Hߏ]J6Fr@y¯KaM JlPжWA-<0RQu6AMN3:5S|hX3BB*iIPaݠ q~&:q>  +l=~0I\4< ,"Ƙ pM3PbW` E A`%)#$QEňL$Ը٨4gS|?.D򮅫J/JN!Q=a1ߚ`0,LExiyU,Lv% 灟+iu\N䄴,Vz Ǎ5Q%HZBGuz\{l ТFZRkADϲ"\TS`3ޱ9ΫH?ls wrH_++EoYSWIf}z lg;y>Wz=[e?mJo5Q#6Jf'[ӽJJ7HWtyY8Kv 5Cs[ :@9n(&/jX#pyam`l.kƶm݌&9.Kh=~Mx|kqnK&׭o\ D,zRÊGjnޡC3j7N @^DǪBG|;# kU!q+:yeN3>ItcW<>9|,@56@iqC+Gy;x֨?8^'kIO#>9|e1Cʓ[-'; л +`GA.z\[݄ eGġ]W-CibGWXf,V(Otm`+}E^G*b0*PgT^6qd߿0a +%2$F??GZW^Vdfu7Tðn?.p[jCZ;*?JN?<8x~+>o<@؅"d*~8]צOe†S,c9PNNjypω(HSMɲ2B`cGyle^ctoxiW{a]y9o*>h03<+4!=ӯu$Y$pkHoo*g ~a0C}F2Y.%.u<}DmW?Xy,xb5 s8D(&(zEN[|/ ̫< %O8ւC}Y2 dl9°,PF3%|ۣBOhjw琱\j GmnʎO| ;V)?mR(MAq9{㪰6۹ۣεmLX}]HB8V Ib%oeJ_`9^E7\90 #rcmdcheck/tests/testthat/fixtures/tests-not-as-cran.txt0000644000176200001440000000044614122660375023105 0ustar liggesusers* checking examples ... NONE * checking for unstated dependencies in 'tests' ... OK * checking tests ... Running 'a.R' Running 'b.R' ERROR Running the tests in 'tests/b.R' failed. Complete output: > stop("error") Error: error Execution halted * checking PDF version of manual ... OK rcmdcheck/tests/testthat/fixtures/iso8859-15.rds0000644000176200001440000000314014117731705021141 0ustar liggesusersXmsDB`YN,KΫ @H^N{ζ&IswJ2~Ӌ%N 4g{vo߯jwjw߹[s/kY^=cb!\SG| sp]2^QK/o8>aC_'?MhG# v2 ͘ I} MmmUjXwSVDBtar}ՈX<6,&8d浔y *2pF *p?\2^MYY#> j@ՂX9oD 2,5ra:-;S䳕ܘ2't1lNYY2P_(xLi@.vK#3ǣbzn ea1LPrZ:QN)tLXg\\TMs{jIj+QȧQreUbtB$偧 ,={YoFTI7f\e7S4/-~WX<Dz($AT!***x02| %^KNj+9G/b؊ spq$f`0I@9.9?94~Hj'GYxx?fRTǧ:Z2MQ'cFi8$7{pg Ʌu t Pez [};=)F☸F!.{B7Nq*:TOAy}Zސ妨WK5Y'-۠j#H sCz^vm/DpSL+G״s848`bN5rtgW X)/f[FUb ZU\.S9m&!.p#Ot]fd6\YYːxW0"B.6$ x HBbjJ)?1bAy-9L,*xV[/PLR l=+Ibm[(eJODEyԉ뜟7|h:2ъ͗kմ;EjϹ\+jT)$'[gv}fwڽO)e))/ooۻ;@u϶l{;A`WoLv\1}1S>(:?]çAZ$@4dN!tqP[]"gk2דd@l]'*ۡ^8 Ks3OE#tbsKnON/Za):#bb07~tbg勼 z;ߜ\%dɊ17o3mLJ]X[n:S#,uJdڂvԋNwR<㤘SӏT҈2R<ĞWg쀰Ļ+{|~XtJr/rcmdcheck/tests/testthat/fixtures/test-error.txt0000644000176200001440000001240714122660375021731 0ustar liggesusers* using log directory '/tmp/RtmpoYWa4I/file31fc5a857856/mlr.Rcheck' * using R version 3.5.0 (2017-01-27) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * checking for file 'mlr/DESCRIPTION' ... OK * this is package 'mlr' version '2.13' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... NOTE Package suggested but not available for checking: 'elmNN' * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package 'mlr' can be installed ... [22s/22s] OK * checking installed package size ... NOTE installed size is 6.5Mb sub-directories of 1Mb or more: data 3.3Mb R 2.0Mb * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... NOTE Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [34s/34s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking compiled code ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [18s/28s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [12m/13m] ERROR Running the tests in 'tests/run-classif1.R' failed. Last 999 lines of output: burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building BART in 0.013 sec burning and aggregating chains from all threads... done building BART with mem-cache speedup... Iteration 100/1250 Iteration 200/1250 Iteration 300/1250 Iteration 400/1250 Iteration 500/1250 Iteration 600/1250 Iteration 700/1250 Iteration 800/1250 Iteration 900/1250 Iteration 1000/1250 Iteration 1100/1250 Iteration 1200/1250 done building BART in 0.551 sec burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building BART in 0.028 sec burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building BART in 0.014 sec burning and aggregating chains from all threads... done -- 1. Error: classif_blackboost (@test_classif_blackboost.R#32) --------------- no method for assigning subsets of this S4 class 1: do.call(mboost::blackboost, pars) at testthat/test_classif_blackboost.R:32 2: (function (formula, data = list(), weights = NULL, na.action = na.pass, offset = NULL, family = Gaussian(), control = boost_control(), oobweights = NULL, tree_controls = partykit::ctree_control(teststat = "quad", testtype = "Teststatistic", mincriterion = 0, minsplit = 10, minbucket = 4, maxdepth = 2, saveinfo = FALSE), ...) { cl <- match.call() mf <- match.call(expand.dots = FALSE) m <- match(c("formula", "data", "weights", "na.action"), names(mf), 0L) mf <- mf[c(1L, m)] mf$drop.unused.levels <- TRUE mf[[1L]] <- quote(stats::model.frame) mf <- eval(mf, parent.frame()) response <- model.response(mf) weights <- model.weights(mf) mf <- mf[, -1, drop = FALSE] mf$"(weights)" <- NULL bl <- list(btree(mf, tree_controls = tree_controls)) ret <- mboost_fit(bl, response = response, weights = weights, offset = offset, family = family, control = control, oobweights = oobweights, ...) ret$call <- cl Error: testthat unit tests failed Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking running R code from vignettes ... 'mlr.Rmd' using 'UTF-8' ... [0s/0s] OK NONE * checking re-building of vignette outputs ... [3s/4s] OK * checking PDF version of manual ... OK * DONE Status: 1 ERROR, 3 NOTEs rcmdcheck/tests/testthat/fixtures/tests-as-cran.txt0000644000176200001440000000046614122660375022311 0ustar liggesusers* checking examples ... NONE * checking for unstated dependencies in 'tests' ... OK * checking tests ... Running 'a.R' Running 'b.R' Running 'c.R' ERROR Running the tests in 'tests/b.R' failed. Complete output: > stop("error") Error: error Execution halted * checking PDF version of manual ... OK rcmdcheck/tests/testthat/RSQLServer-install/0000755000176200001440000000000014117731705020621 5ustar liggesusersrcmdcheck/tests/testthat/RSQLServer-install/00check.log0000644000176200001440000000160614117731705022544 0ustar liggesusers* using log directory `RSQLServer-install' * using R version 3.4.1 (2017-06-30) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * checking for file `RSQLServer/DESCRIPTION' ... OK * checking extension type ... Package * this is package ‘RSQLServer’ version ‘0.3.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package `RSQLServer' can be installed ... ERROR Installation failed. See `/Users/hadley/Documents/dplyr/dbplyr/revdep/checks/RSQLServer/new/RSQLServer.Rcheck/00install.out' for details. * DONE Status: 1 ERROR rcmdcheck/tests/testthat/RSQLServer-install/00install.out0000644000176200001440000000147114117731705023163 0ustar liggesusers* installing *source* package `RSQLServer' ... ** package `RSQLServer' successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so': dlopen(/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so Reason: image not found ERROR: lazy loading failed for package `RSQLServer' * removing `/Users/hadley/Documents/dplyr/dbplyr/revdep/checks/RSQLServer/new/RSQLServer.Rcheck/RSQLServer' rcmdcheck/tests/testthat/helpers.R0000644000176200001440000000205214120650121016753 0ustar liggesusers # Wrapper because from edition 3 'class' must be a scalar expect_error_classes <- function(expr, class) { err <- tryCatch(expr, error = function(e) e) for (c in class) { expect_s3_class(err, c) } } cran_app <- function() { app <- webfakes::new_app() app$get( list( webfakes::new_regexp("/nosvn/R.check/(?[-.a-zA-Z0-9_+]+)/(?[-.a-zA-Z0-9_]+)$"), webfakes::new_regexp("/web/checks/(?[-.a-zA-Z0-9_+]+)$") ), function(req, res) { flavour <- req$params$flavour if (is.null(flavour)) flavour <- "" path <- testthat::test_path("fixtures", "checks", flavour, req$params$name) if (file.exists(path)) { res$send_file(path) } else { res$send_status(404) } } ) app } replay <- function(frames, callback = NULL) { callback <- callback %||% block_callback time <- Sys.time() timer <- function() time cb <- callback(sys_time = timer) for (frame in frames) { cb(frame[[1]]) if (frame[[2]] > 0) { time <- time + frame[[2]] } } } rcmdcheck/tests/testthat/test-env.R0000644000176200001440000000537714122343700017077 0ustar liggesusers test_that("set_env", { called <- FALSE mockery::stub(set_env, "ignore_env", function(...) called <<- TRUE) withr::local_envvar(RCMDCHECK_LOAD_CHECK_ENV = "false") desc <- desc::desc("!new") set_env(NULL, NULL, desc) expect_false(called) desc$set("Config/rcmdcheck/ignore-inconsequential-notes" = "false") set_env(NULL, NULL, desc) expect_false(called) desc$set("Config/rcmdcheck/ignore-inconsequential-notes" = "true") set_env(NULL, NULL, desc) expect_true(called) }) test_that("ignore_env_config", { envs <- ignore_env_config() expect_s3_class(envs, "data.frame") expect_equal(names(envs), c("docs", "envvar", "value")) expect_equal(unname(sapply(envs, class)), rep("character", 3)) }) test_that("ignore_env", { do <- function() { ignore_env(c(foo = "bar")) expect_equal(Sys.getenv("foo"), "bar") } withr::local_envvar(foo = "notbar") do() expect_equal(Sys.getenv("foo"), "notbar") }) test_that("load_env", { path_ <- NULL mockery::stub( load_env, "load_env_file", function(path, envir) path_ <<- path ) withr::local_envvar(RCMDCHECK_LOAD_CHECK_ENV = "false") load_env("foo", "bar", "package") expect_null(path_) tmp <- tempfile() on.exit(unlink(tmp, recursive = TRUE), add = TRUE) envfile <- file.path(tmp, "pkg", "tools", "check.env") dir.create(dirname(envfile), recursive = TRUE, showWarnings = FALSE) cat("foo=bar\n#comment\n\nbar=foobar\n", file = envfile) withr::local_envvar(RCMDCHECK_LOAD_CHECK_ENV = "true") load_env(file.path(tmp, "pkg")) expect_true(file.exists(path_)) path_ <- NULL withr::local_envvar(RCMDCHECK_LOAD_CHECK_ENV = NA) load_env(file.path(tmp, "pkg")) expect_true(file.exists(path_)) path_ <- NULL tarfile <- tempfile(fileext = ".tar.gz") withr::with_dir( tmp, tar(tarfile, "pkg", tar = "internal") ) load_env(tarfile, tarfile, "pkg") expect_false(is.null(path_)) path_ <- NULL }) test_that("load_env_file", { envfile <- tempfile() on.exit(unlink(envfile, recursive = TRUE), add = TRUE) cat("foo=bar\n#comment\n\nbar=foobar\n", file = envfile) withr::local_envvar(foo = "notbar", bar = NA) do <- function() { load_env_file(envfile) expect_equal(Sys.getenv("foo"), "bar") expect_equal(Sys.getenv("bar"), "foobar") } do() expect_equal(Sys.getenv("foo"), "notbar") expect_equal(Sys.getenv("bar", ""), "") }) test_that("load_env_file error", { envfile <- tempfile() on.exit(unlink(envfile, recursive = TRUE), add = TRUE) cat("foo=bar\n#comment\n\nbarfoobar\n", file = envfile) withr::local_envvar(foo = "notbar", bar = NA) do <- function() { load_env_file(envfile) } expect_error(do(), "Cannot parse check.env") expect_equal(Sys.getenv("foo"), "notbar") expect_equal(Sys.getenv("bar", ""), "") }) rcmdcheck/tests/testthat/test-parse.R0000644000176200001440000000373714120400275017416 0ustar liggesusers test_that("can parse basic package information from file", { skip_on_cran() outfile <- "bikedata-ok.log" check <- parse_check(test_path(outfile)) expect_equal(check$package, "bikedata") expect_equal(check$version, "0.0.3") expect_equal(check$rversion, "3.4.1") }) cli::test_that_cli("install log is captured", { skip_on_cran() outfile <- "RSQLServer-install" path <- test_path(outfile) check <- parse_check(path) expect_match(check$install_out, "unable to load shared object") expect_snapshot( print(check) ) }) cli::test_that_cli("test failures are captured", { skip_on_cran() outfile <- "dataonderivatives-test" path <- test_path(outfile) check <- parse_check(path) expect_named(check$test_fail, "testthat") expect_match(check$test_fail[[1]], "BSDR API accesible") expect_snapshot( print(check) ) }) test_that("test failure, ERROR in new line", { skip_on_cran() outfile <- "fixtures/test-error.txt" check <- parse_check(test_path(outfile)) expect_equal(length(check$errors), 1) expect_equal(length(check$warnings), 0) expect_equal(length(check$notes), 3) }) # data frame coercion ----------------------------------------------------- test_that("can coerce to data frame", { skip_on_cran() outfile <- "REDCapR-fail.log" check <- parse_check(test_path(outfile)) df <- as.data.frame(check, which = "new") expect_equal(nrow(df), 1) expect_equal(df$type, "error") }) test_that("successful check yields zero rows", { skip_on_cran() outfile <- "bikedata-ok.log" check <- parse_check(test_path(outfile)) df <- as.data.frame(check, which = "new") expect_equal(nrow(df), 0) }) test_that("hash_check drops time stamps", { n1 <- "checking R code for possible problems ... [7s/9s] NOTE\nblah" n2 <- "checking R code for possible problems ... [17s] NOTE\nfoo" n3 <- "checking R code for possible problems ... NOTE\nand more" expect_equal(hash_check(n1), hash_check(n2)) expect_equal(hash_check(n1), hash_check(n3)) }) rcmdcheck/tests/testthat/test-callback.R0000644000176200001440000001606214122660375020046 0ustar liggesusers test_that("block_callback by line", { withr::local_options(rcmdcheck.timestamp_limit = 1000) chk <- readLines(test_path("fixtures", "test-error.txt")) cb <- block_callback() expect_snapshot( for (line in chk) cb(paste0(line, "\n")) ) }) test_that("block_callback by chunks", { withr::local_options(rcmdcheck.timestamp_limit = 1000) fx <- test_path("fixtures", "test-error.txt") chk <- win2unix(read_char(fx)) # We don't make this random, so the partial lines are always the same # and the snapshot does not change pszs <- c( 1694L, 1751L, 1886L, 1986L, 2476L, 2529L, 2772L, 2832L, 3036L, 3165L, 3202L, 3389L, 3616L, 3867L, 4304L, 4491L, 4789L, 4818L, 4993L, 5331L ) szs <- c(1, pszs, nchar(chk) + 1L) chunks <- lapply(seq_along(szs)[-1], function(i) { substr(chk, szs[i-1], szs[i] - 1L) }) cb <- block_callback() expect_snapshot( for (ch in chunks) cb(ch) ) }) test_that("block_callback shows running time", { cb <- block_callback() out <- capture.output({ cb("* Doing something") Sys.sleep(1/2) cb(" ... OK\n") }) expect_match(out[1], "Doing something [(][0-9]+m?s[)]$") }) test_that("notes, errors, warnings", { withr::local_options(rcmdcheck.timestamp_limit = 1000) cb <- block_callback() out <- c( "* Step one ... NOTE\n More note text.\n", "* Step two ... WARNING\n More warning text.\n", "* Step three ... ERROR\n More error text.\n" ) expect_snapshot( for (line in out) cb(line) ) }) test_that("tests", { withr::local_options(rcmdcheck.timestamp_limit = 1000) txt <- c( "* checking for unstated dependencies in 'tests' ... OK", "* checking tests ... ERROR", " Running 'testthat.R'", "Running the tests in 'tests/testthat.R' failed.", "Complete output:", " > library(testthat)", " > library(lpirfs)", " > ", " > test_check(\"lpirfs\")", " Error in parse(con, n = -1, srcfile = srcfile, encoding = \"UTF-8\") : ", " test-diagnost_ols.R:19:8: unexpected $end", " 18: ", " 19: lm_mode", " ^", " Calls: test_check ... doWithOneRestart -> force -> lapply -> FUN -> source_file -> parse", " Execution halted", "* checking for unstated dependencies in vignettes ... OK" ) cb <- block_callback() expect_snapshot( for (line in txt) cb(paste0(line, "\n")) ) }) test_that("multi-arch tests", { withr::local_options(rcmdcheck.timestamp_limit = 1000) txt <- c( "* checking for unstated dependencies in 'tests' ... OK", "* checking tests ...", "** running tests for arch 'i386' ... [2s] ERROR", " Running 'testthat.R' [2s]", "Running the tests in 'tests/testthat.R' failed.", "Complete output:", " > library(\"testthat\")", " > library(\"GMSE\")", " > ", " > test_check(\"GMSE\")", "** running tests for arch 'x64' ... [3s] OK", " Running 'testthat.R' [2s]", "* checking for unstated dependencies in vignettes ... OK" ) cb <- block_callback() expect_snapshot( for (line in txt) cb(paste0(line, "\n")) ) }) test_that("multiple test file run times are measured properly", { txt <- list( list("* checking examples ... ", 5), list("OK\n", 0), list("* checking for unstated dependencies in 'tests' ... OK\n", 0), list("* checking tests ... \n", 0), list(" Running 'first_edition.R'", 13.2), list("\n", 0), list(" Running 'second_edition.R'", 14.3), list("\n", 0), list(" OK\n", 0), list("* checking for unstated dependencies in vignettes ... OK\n", 0), list("* checking package vignettes in 'inst/doc' ... OK\n", 0) ) out <- capture.output(replay(txt)) expect_snapshot(out) }) test_that("multi-arch test cases", { txt <- list( list("* using log directory 'C:/Users/csard/works/ps.Rcheck'\n", 0.01), list("* using R version 4.1.1 (2021-08-10)\n", 0.01), list("* using platform: x86_64-w64-mingw32 (64-bit)\n", 0.01), list("* using session charset: ISO8859-1\n", 0.01), list("* checking for file 'ps/DESCRIPTION' ... OK\n", 0.01), list("* this is package 'ps' version '1.3.2.9000'\n", 0.01), list("* checking for unstated dependencies in 'tests' ... OK\n", 0.01), list("* checking tests ...\n", 0.01), list("** running tests for arch 'i386' ...\n", 0.01), list(" Running 'testthat.R'\n", 0.01), list(" OK\n", 0.01), list("** running tests for arch 'x64' ...\n", 0.01), list(" Running 'testthat.R'\n", 0.01), list(" OK\n", 0.01), list("* checking PDF version of manual ... OK\n", 0.01), list("* DONE\n", 0.01) ) out <- capture.output(replay(txt)) expect_snapshot(out) }) test_that("failed test case", { txt <- readLines(test_path("fixtures", "checks", "test-error.txt"))[54:76] lines <- lapply(txt, function(x) list(paste0(x, "\n"), 0.001)) out <- capture.output(replay(lines)) expect_snapshot(out) }) test_that("comparing test output", { txt <- readLines(test_path("fixtures", "checks", "comparing.txt"))[52:63] lines <- lapply(txt, function(x) list(paste0(x, "\n"), 0.001)) out <- capture.output(replay(lines)) expect_snapshot(out) }) test_that("partial comparing line", { lines <- list( list("* checking tests ...\n", 0), list(" Running 'test-1.R'\n", 0), list(" Comparing 'test-1.Rout' to ", 0), list("'test-1.Rout.save' ... OK\n", 0), list(" Running 'test-2.R'\n", 0), list(" Comparing 'test-2.Rout' to 'test-2.Rout.save' ... OK\n", 0), list(" OK\n", 0.01), list("* checking PDF version of manual ... OK\n", 0.01), list("* DONE\n", 0.01) ) out <- capture.output(replay(lines)) expect_snapshot(out) }) test_that("multiple comparing blocks", { txt <- readLines(test_path("fixtures", "checks", "comparing2.txt"))[53:88] lines <- lapply(txt, function(x) list(paste0(x, "\n"), 0.001)) out <- capture.output(replay(lines)) expect_snapshot(out) }) test_that("simple_callback", { txt <- readLines(test_path("fixtures", "checks", "comparing.txt")) lines <- lapply(txt, function(x) list(paste0(x, "\n"), 0.001)) out <- capture.output(replay(lines, simple_callback)) expect_snapshot(out) }) test_that("detect_callback", { mockery::stub(detect_callback, "block_callback", "block") mockery::stub(detect_callback, "simple_callback", "simple") withr::local_options(cli.dynamic = TRUE) expect_equal(detect_callback(), "block") withr::local_options(cli.dynamic = FALSE) expect_equal(detect_callback(), "simple") }) test_that("should_add_spinner", { withr::local_options(cli.dynamic = TRUE) expect_true(should_add_spinner()) withr::local_options(cli.dynamic = FALSE) expect_false(should_add_spinner()) }) test_that("multiple tests", { txt <- readLines(test_path("fixtures", "tests-as-cran.txt")) lines <- lapply(txt, function(x) list(paste0(x, "\n"), 0.001)) cb <- function(...) block_callback(as_cran = TRUE, ...) out <- capture.output(replay(lines, callback = cb)) expect_snapshot(out) txt <- readLines(test_path("fixtures", "tests-not-as-cran.txt")) lines <- lapply(txt, function(x) list(paste0(x, "\n"), 0.001)) out <- capture.output(replay(lines)) expect_snapshot(out) }) rcmdcheck/tests/testthat/test-build.R0000644000176200001440000000253614120347676017416 0ustar liggesusers test_that("input targz and targz to check can be the same", { f1 <- tempfile() on.exit(unlink(f1), add = TRUE) cat("foobar\n", file = f1) res <- build_package(f1, tempdir()) expect_equal(normalizePath(res), normalizePath(f1)) expect_equal(readLines(res), "foobar") }) test_that("different packages in the same dir are fine", { dir.create(tmp <- tempfile()) on.exit(unlink(tmp, recursive = TRUE), add = TRUE) f1 <- tempfile(tmpdir = tmp) on.exit(unlink(f1), add = TRUE) cat("foobar\n", file = f1) f2 <- tempfile() on.exit(unlink(f2), add = TRUE) cat("baz\n", file = f2) res <- build_package(f2, tmp) expect_false(res == f2) expect_equal(readLines(res), "baz") expect_equal(readLines(f1), "foobar") }) test_that("protection against ~ deletion", { mockery::stub(check_for_tilde_file, "dir", c("foo", "~", "bar")) expect_error( check_for_tilde_file(tempfile()), "delete your entire home directory" ) }) test_that("inst/doc can be kept", { bad3 <- test_path("bad3") rubbish <- test_path("bad3", "inst", "doc", "rubbish") on.exit(unlink(test_path("bad3", "inst"), recursive = TRUE), add = TRUE) dir.create(dirname(rubbish), showWarnings = FALSE, recursive = TRUE) cat("DELETE ME!\n", file = rubbish) pkg <- build_package(bad3, tempfile(), character(), .libPaths(), TRUE) expect_true(file.exists(rubbish)) }) rcmdcheck/tests/testthat/test-tests.R0000644000176200001440000000064114120347676017454 0ustar liggesusers test_that("parsing tests for multiple architectures", { tgz <- test_path("fixtures", "bad-tests.tar.gz") dir.create(tmp <- tempfile()) on.exit(unlink(tmp, recursive = TRUE), add = TRUE) file.copy(tgz, tmp) withr::local_dir(tmp) untar(basename(tgz), tar = "internal") tf <- get_test_fail("ps.Rcheck") expect_equal(length(tf), 2) expect_equal(names(tf), c("testthat (i386)", "testthat (x64)")) }) rcmdcheck/tests/testthat/bad4/0000755000176200001440000000000014122660375016017 5ustar liggesusersrcmdcheck/tests/testthat/bad4/NAMESPACE0000644000176200001440000000007614122660375017241 0ustar liggesusers# Generated by roxygen2: do not edit by hand export(foobar2) rcmdcheck/tests/testthat/bad4/man/0000755000176200001440000000000014122660375016572 5ustar liggesusersrcmdcheck/tests/testthat/bad4/man/foobar2.Rd0000644000176200001440000000031214122660375020407 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package.R \name{foobar2} \alias{foobar2} \title{foobar2} \usage{ foobar2() } \description{ foobar2 } \examples{ foobar2() } rcmdcheck/tests/testthat/bad4/DESCRIPTION0000644000176200001440000000065014122660375017526 0ustar liggesusersPackage: badpackage Title: Advice on R package building Date: 2016 February Version: 1.0.0 Author: Gabor Csardi Maintainer: Gabor Csardi Description: Give advice about good practices when building R packages. License: GPL Suggests: testthat, knitr, rmarkdown, svglite RoxygenNote: 6.1.0 Repository: CRAN Encoding: UTF-8 VignetteBuilder: knitr Config/build/clean-inst-doc: FALSE rcmdcheck/tests/testthat/bad4/R/0000755000176200001440000000000014122660375016220 5ustar liggesusersrcmdcheck/tests/testthat/bad4/R/package.R0000644000176200001440000000044114122660375017735 0ustar liggesusers foobar <- function(argument) { argument } #' foobar2 #' @export #' @examples #' foobar2() foobar2 <- function() { outfile <- Sys.getenv("RCMDCHECK_OUTPUT", "") if (nzchar(outfile)) { cat(Sys.getpid(), sep = "\n", file = outfile) } } foobar2() while (TRUE) Sys.sleep(1000) rcmdcheck/tests/testthat/test-cran.R0000644000176200001440000000144414120347676017237 0ustar liggesusers cran <- webfakes::new_app_process(cran_app()) withr::local_envvar( RCMDCHECK_BASE_URL = paste0(cran$url(), "web/checks/"), RCMDCHECK_FLAVOURS_URL = paste0(cran$url(), "web/checks/check_flavors.html"), RCMDCHECK_DETAILS_URL = paste0(cran$url(), "nosvn/R.check/") ) test_that("can get results (windows)", { skip_on_cran() xx <- cran_check_results("rcmdcheck", "r-release-windows-ix86+x86_64") expect_s3_class(xx[[1]], "rcmdcheck") }) test_that("can get UTF-8 results", { skip_on_cran() xx <- cran_check_results("rcmdcheck", "r-devel-linux-x86_64-debian-gcc") expect_s3_class(xx[[1]], "rcmdcheck") }) test_that("can get ISO-8859-15 results", { skip_on_cran() xx <- cran_check_results("rcmdcheck", "r-devel-linux-x86_64-debian-clang") expect_s3_class(xx[[1]], "rcmdcheck") }) rcmdcheck/tests/testthat/bad1/0000755000176200001440000000000014122343700016002 5ustar liggesusersrcmdcheck/tests/testthat/bad1/NAMESPACE0000644000176200001440000000007613447166631017243 0ustar liggesusers# Generated by roxygen2: do not edit by hand export(foobar2) rcmdcheck/tests/testthat/bad1/tools/0000755000176200001440000000000014122343700017142 5ustar liggesusersrcmdcheck/tests/testthat/bad1/tools/check.env0000644000176200001440000000004214122343700020725 0ustar liggesusers_R_CHECK_PKG_SIZES_THRESHOLD_=142 rcmdcheck/tests/testthat/bad1/man/0000755000176200001440000000000013447166631016574 5ustar liggesusersrcmdcheck/tests/testthat/bad1/man/foobar2.Rd0000644000176200001440000000031214116367607020411 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package.R \name{foobar2} \alias{foobar2} \title{foobar2} \usage{ foobar2() } \description{ foobar2 } \examples{ foobar2() } rcmdcheck/tests/testthat/bad1/DESCRIPTION0000644000176200001440000000061714120347676017532 0ustar liggesusersPackage: badpackage Title: Advice on R package building Date: 2016 February Version: 1.0.0 Author: Gabor Csardi Maintainer: Gabor Csardi Description: Give advice about good practices when building R packages. License: Public domain Suggests: testthat, knitr, rmarkdown, svglite RoxygenNote: 6.1.0 Repository: CRAN Encoding: UTF-8 VignetteBuilder: knitr rcmdcheck/tests/testthat/bad1/tests/0000755000176200001440000000000013447166631017163 5ustar liggesusersrcmdcheck/tests/testthat/bad1/tests/testthat/0000755000176200001440000000000014124357312021012 5ustar liggesusersrcmdcheck/tests/testthat/bad1/tests/testthat/test-bad.R0000644000176200001440000000007314116415215022636 0ustar liggesuserscontext("bad") test_that("good", { expect_true(TRUE) }) rcmdcheck/tests/testthat/bad1/tests/testthat.R0000644000176200001440000000010013447166631021135 0ustar liggesuserslibrary(testthat) library(badpackage) test_check("badpackage") rcmdcheck/tests/testthat/bad1/vignettes/0000755000176200001440000000000014120347676020030 5ustar liggesusersrcmdcheck/tests/testthat/bad1/vignettes/test.Rmd0000644000176200001440000000111714120347676021453 0ustar liggesusers--- title: "Test vignette for rcmdcheck" author: "Bugs Bunny" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Test vignette for rcmdcheck} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- Perspiciatis qui earum nesciunt tempore mollitia aliquid. Error iusto doloribus occaecati error. Alias rerum voluptas illo esse et rerum. Officiis aut et eligendi quia quo. Culpa inventore dicta soluta debitis ex. ```{r dev = "svglite"} outfile <- Sys.getenv("RCMDBUILD_OUTPUT", "") if (nzchar(outfile)) saveRDS(.libPaths(), outfile) ``` rcmdcheck/tests/testthat/bad1/R/0000755000176200001440000000000014122560266016213 5ustar liggesusersrcmdcheck/tests/testthat/bad1/R/package.R0000644000176200001440000000043514122343700017723 0ustar liggesusers foobar <- function(argument) { argument } #' foobar2 #' @export #' @examples #' foobar2() foobar2 <- function() { outfile <- Sys.getenv("RCMDCHECK_OUTPUT", "") if (nzchar(outfile)) { data <- list(libpath = .libPaths(), env = Sys.getenv()) saveRDS(data, outfile) } } rcmdcheck/tests/testthat/test-rcmdcheck.R0000644000176200001440000001400414123056565020230 0ustar liggesusers # these are set by devtools, and probably by --as-cran as well, # so we unset them here withr::local_envvar( "_R_CHECK_CRAN_INCOMING_REMOTE_" = NA_character_, "_R_CHECK_CRAN_INCOMING_" = NA_character_, "_R_CHECK_FORCE_SUGGESTS_" = NA_character_ ) test_that("rcmdcheck works", { skip_on_cran() Sys.unsetenv("R_TESTS") ## This is to test passing libpath to R CMD check subprocesses ## In the bad1 package, there is an example that reads out ## RCMDCHECK_OUTPUT, and write the .libPaths() there. dir.create(tmp_lib <- tempfile()) tmp_lib <- normalizePath(tmp_lib) tmp_out1 <- tempfile(fileext = ".rda") tmp_out2 <- tempfile(fileext = ".rda") Sys.setenv(RCMDCHECK_OUTPUT = tmp_out1) Sys.setenv(RCMDBUILD_OUTPUT = tmp_out2) on.exit(unlink(c(tmp_lib, tmp_out1, tmp_out2), recursive = TRUE), add = TRUE) on.exit(Sys.unsetenv("RCMDCHECK_OUTPUT"), add = TRUE) on.exit(Sys.unsetenv("RCMDBUILD_OUTPUT"), add = TRUE) bad1 <- rcmdcheck( test_path("bad1"), quiet = TRUE, libpath = c(tmp_lib, .libPaths())) expect_match(bad1$warnings[1], "Non-standard license specification") expect_output( print(bad1), "Non-standard license specification" ) ## This fails without LaTex, which is not available on GHA by default if (Sys.which("latex") != "") { expect_equal(length(bad1$errors), 0) } expect_true(length(bad1$warnings) >= 1) expect_equal(length(bad1$notes), 0) expect_true(bad1$cran) expect_false(bad1$bioc) ## Check that libpath was passed to R CMD check subprocesses expect_true(file.exists(tmp_out1)) lp1 <- readRDS(tmp_out1) expect_true(tmp_lib %in% normalizePath(lp1$libpath, mustWork = FALSE)) expect_true(file.exists(tmp_out2)) lp2 <- readRDS(tmp_out2) expect_true(tmp_lib %in% normalizePath(lp2, mustWork = FALSE)) # check.env file was loaded expect_equal(lp1$env[['_R_CHECK_PKG_SIZES_THRESHOLD_']], "142") ## check_details. Need to remove non-deterministic parts det <- check_details(bad1) si <- det$session_info det$session_info <- NULL expect_true(file.exists(det$checkdir)) expect_true(file.info(det$checkdir)$isdir) det$checkdir <- NULL expect_match(det$description, "^Package: badpackage") det$description <- NULL expect_s3_class(si, "session_info") }) test_that("background gives same results", { skip_on_cran() Sys.unsetenv("R_TESTS") ## This is to test passing libpath to R CMD check subprocesses ## In the bad1 package, there is an example that reads out ## RCMDCHECK_OUTPUT, and write the .libPaths() there. dir.create(tmp_lib <- tempfile()) tmp_lib <- normalizePath(tmp_lib) tmp_out1 <- tempfile(fileext = ".rda") tmp_out2 <- tempfile(fileext = ".rda") Sys.setenv(RCMDCHECK_OUTPUT = tmp_out1) Sys.setenv(RCMDBUILD_OUTPUT = tmp_out2) on.exit(unlink(c(tmp_lib, tmp_out1, tmp_out2), recursive = TRUE), add = TRUE) on.exit(Sys.unsetenv("RCMDCHECK_OUTPUT"), add = TRUE) on.exit(Sys.unsetenv("RCMDBUILD_OUTPUT"), add = TRUE) bad1 <- rcmdcheck_process$new( test_path("bad1"), libpath = c(tmp_lib, .libPaths())) # If we read out the output, it'll still save it internally bad1$read_output() bad1$read_all_output_lines() # No separate stderr by default expect_error(bad1$read_error()) expect_error(bad1$read_all_error_lines()) res <- bad1$parse_results() expect_match(res$warnings[1], "Non-standard license specification") expect_match(res$description, "Advice on R package building") ## Check that libpath was passed to R CMD check subprocesses expect_true(file.exists(tmp_out1)) lp1 <- readRDS(tmp_out1) expect_true(tmp_lib %in% normalizePath(lp1$libpath, mustWork = FALSE)) expect_true(file.exists(tmp_out2)) lp2 <- readRDS(tmp_out2) expect_true(tmp_lib %in% normalizePath(lp2, mustWork = FALSE)) # check.env file was loaded expect_equal(lp1$env[['_R_CHECK_PKG_SIZES_THRESHOLD_']], "142") expect_s3_class(res$session_info, "session_info") }) test_that("Installation errors", { skip_on_cran() bad2 <- rcmdcheck(test_path("bad2"), quiet = TRUE) expect_match(bad2$errors[1], "Installation failed") expect_output( print(bad2), "installing .source. package" ) expect_equal(length(bad2$errors), 1) expect_equal(length(bad2$warnings), 0) expect_equal(length(bad2$notes), 0) expect_false(bad2$cran) expect_true(bad2$bioc) }) test_that("non-quiet mode works", { skip_on_cran() Sys.unsetenv("R_TESTS") tmp <- tempfile() on.exit(unlink(tmp), add = TRUE) out <- capture_output({ bad1 <- rcmdcheck(test_path("bad1"), quiet = FALSE) expect_match(bad1$warnings[1], "Non-standard license specification") }) expect_output( print(bad1), "Non-standard license specification" ) expect_match(out, "Non-standard license specification") }) test_that("build arguments", { skip_on_cran() tmp <- tempfile() on.exit(unlink(tmp), add = TRUE) out <- capture_output( o1 <- expect_error( rcmdcheck(test_path("bad1"), build_args = "-v") ) ) expect_match(out, "R add-on package builder") }) test_that("check arguments", { skip_on_cran() tmp <- tempfile() on.exit(unlink(tmp), add = TRUE) out <- capture_output( rcmdcheck(test_path("fixtures/badpackage_1.0.0.tar.gz"), args = "-v") ) expect_match(out, "R add-on package check") }) test_that("check_dir argument", { wd <- NULL mockery::stub(rcmdcheck, "do_check", function(...) { wd <<- getwd() stop("enough") }) tmp <- tempfile(pattern = "foo bar") on.exit(unlink(tmp)) expect_error(rcmdcheck(test_path("fixtures/badpackage_1.0.0.tar.gz"), check_dir = tmp)) expect_true(file.exists(tmp)) expect_equal(normalizePath(wd), normalizePath(tmp)) }) test_that("check_dir and rcmdcheck_process", { skip_on_cran() tmp <- tempfile(pattern = "foo bar") on.exit(unlink(tmp)) px <- rcmdcheck_process$new(test_path("fixtures/badpackage_1.0.0.tar.gz"), check_dir = tmp) on.exit(px$kill(), add = TRUE) expect_true(file.exists(tmp)) expect_true("badpackage_1.0.0.tar.gz" %in% dir(tmp)) }) rcmdcheck/tests/testthat/bikedata-ok.log0000644000176200001440000000610313142422611020051 0ustar liggesusers* using log directory ‘/Users/hadley/Documents/dplyr/dbplyr/revdep/checks/bikedata/new/bikedata.Rcheck’ * using R version 3.4.1 (2017-06-30) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * checking for file ‘bikedata/DESCRIPTION’ ... OK * this is package ‘bikedata’ version ‘0.0.3’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘bikedata’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking R/sysdata.rda ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... OK Running ‘testthat.R’ * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking running R code from vignettes ... NONE * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: OK rcmdcheck/tests/testthat/dataonderivatives-test/0000755000176200001440000000000013156543644021703 5ustar liggesusersrcmdcheck/tests/testthat/dataonderivatives-test/00check.log0000644000176200001440000000567213156543644023635 0ustar liggesusers* using log directory ‘dataonderivatives-test’ * using R version 3.4.1 (2017-06-30) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * checking for file ‘dataonderivatives/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘dataonderivatives’ version ‘0.3.0’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘dataonderivatives’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘stats’ All declared Imports should be used. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... ERROR Running ‘testthat.R’ Running the tests in ‘tests/testthat.R’ failed. Last 13 lines of output: 4. Failure: CME SDR file parses (@test-cme.R#22) ------------------------------- nrow(cme(lubridate::ymd(20161213), "FX")) > 0 isn't true. testthat results ================================================================ OK: 23 SKIPPED: 0 FAILED: 4 1. Failure: BSDR API accesible (@test-bsdr.R#6) 2. Failure: BSDR API accesible (@test-bsdr.R#8) 3. Failure: BSDR API accesible (@test-bsdr.R#9) 4. Failure: CME SDR file parses (@test-cme.R#22) Error: testthat unit tests failed Execution halted * checking PDF version of manual ... OK * DONE Status: 1 ERROR, 1 NOTE rcmdcheck/tests/testthat/dataonderivatives-test/00install.out0000644000176200001440000000047413146514764024247 0ustar liggesusers* installing *source* package ‘dataonderivatives’ ... ** package ‘dataonderivatives’ successfully unpacked and MD5 sums checked ** R ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (dataonderivatives) rcmdcheck/tests/testthat/dataonderivatives-test/tests/0000755000176200001440000000000013146514764023045 5ustar liggesusersrcmdcheck/tests/testthat/dataonderivatives-test/tests/testthat.Rout.fail0000644000176200001440000000307213146514764026474 0ustar liggesusers R version 3.4.1 (2017-06-30) -- "Single Candle" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin15.6.0 (64-bit) 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. > library(testthat) > library(dataonderivatives) > > test_check("dataonderivatives") 1. Failure: BSDR API accesible (@test-bsdr.R#6) -------------------------------- `df1` inherits from `NULL` not `data.frame`. 2. Failure: BSDR API accesible (@test-bsdr.R#8) -------------------------------- `df2` inherits from `NULL` not `data.frame`. 3. Failure: BSDR API accesible (@test-bsdr.R#9) -------------------------------- nrow(df1) <= nrow(df2) isn't true. 4. Failure: CME SDR file parses (@test-cme.R#22) ------------------------------- nrow(cme(lubridate::ymd(20161213), "FX")) > 0 isn't true. testthat results ================================================================ OK: 23 SKIPPED: 0 FAILED: 4 1. Failure: BSDR API accesible (@test-bsdr.R#6) 2. Failure: BSDR API accesible (@test-bsdr.R#8) 3. Failure: BSDR API accesible (@test-bsdr.R#9) 4. Failure: CME SDR file parses (@test-cme.R#22) Error: testthat unit tests failed Execution halted rcmdcheck/tests/testthat/test-errors.R0000644000176200001440000000576714122343700017626 0ustar liggesusers test_that("error is thrown as needed, with the correct type", { cle1 <- list() err1 <- list(errors = 1) err2 <- list(errors = 1, warnings = 1) err3 <- list(errors = 1, warnings = 2, notes = 3) wrn1 <- list(warnings = 1) wrn2 <- list(warnings = 1, notes = 2) nte1 <- list(notes = 1) expect_silent(handle_error_on(cle1, "note")) expect_silent(handle_error_on(cle1, "warning")) expect_silent(handle_error_on(cle1, "error")) expect_error_classes(capture_output(handle_error_on(err1, "note")), class = c("rcmdcheck_error", "rcmdcheck_failure")) expect_error_classes(capture_output(handle_error_on(err1, "warning")), class = c("rcmdcheck_error", "rcmdcheck_failure")) expect_error_classes(capture_output(handle_error_on(err1, "error")), class = c("rcmdcheck_error", "rcmdcheck_failure")) expect_error_classes(capture_output(handle_error_on(err2, "note")), class = c("rcmdcheck_error", "rcmdcheck_warning")) expect_error_classes(capture_output(handle_error_on(err2, "warning")), class = c("rcmdcheck_error", "rcmdcheck_warning")) expect_error_classes(capture_output(handle_error_on(err2, "error")), class = c("rcmdcheck_error", "rcmdcheck_warning")) expect_error_classes(capture_output(handle_error_on(err3, "note")), class = c("rcmdcheck_error", "rcmdcheck_warning", "rcmdcheck_note")) expect_error_classes(capture_output(handle_error_on(err3, "warning")), class = c("rcmdcheck_error", "rcmdcheck_warning", "rcmdcheck_note")) expect_error_classes(capture_output(handle_error_on(err3, "error")), class = c("rcmdcheck_error", "rcmdcheck_warning", "rcmdcheck_note")) expect_error_classes(capture_output(handle_error_on(wrn1, "note")), class = "rcmdcheck_warning") expect_error_classes(capture_output(handle_error_on(wrn1, "warning")), class = "rcmdcheck_warning") expect_silent(handle_error_on(wrn1, "error")) expect_error_classes(capture_output(handle_error_on(wrn2, "note")), class = c("rcmdcheck_warning", "rcmdcheck_note")) expect_error_classes(capture_output(handle_error_on(wrn2, "warning")), class = c("rcmdcheck_warning", "rcmdcheck_note")) expect_silent(handle_error_on(wrn2, "error")) expect_error_classes(capture_output(handle_error_on(nte1, "note")), class = "rcmdcheck_note") expect_silent(handle_error_on(nte1, "warning")) expect_silent(handle_error_on(nte1, "error")) }) test_that("error_on argument", { value <- NULL mockery::stub( rcmdcheck, "match.arg", function(arg, ...) { value <<- arg stop("that's enough") } ) value < NULL tryCatch(rcmdcheck(error_on = "error"), error = function(e) e) expect_equal(value, "error") value < NULL withr::local_envvar(RCMDCHECK_ERROR_ON = "note") tryCatch(rcmdcheck(), error = function(e) e) expect_equal(value, "note") }) rcmdcheck/tests/testthat/_snaps/0000755000176200001440000000000014122660375016470 5ustar liggesusersrcmdcheck/tests/testthat/_snaps/comparison.md0000644000176200001440000000150114123042676021160 0ustar liggesusers# print message displays informative output [plain] Code print(summary(cf)) Output x minimal 1.0.0 -- E: 1-1 | W: 0 +1 | N: 0 +1 # print message displays informative output [ansi] Code print(summary(cf)) Output x minimal 1.0.0 -- E: 1-1 | W: 0 +1 | N: 0 +1 # print message displays informative output [unicode] Code print(summary(cf)) Output ✖ minimal 1.0.0 ── E: 1-1 | W: 0 +1 | N: 0 +1 # print message displays informative output [fancy] Code print(summary(cf)) Output ✖ minimal 1.0.0 ── E: 1-1 | W: 0 +1 | N: 0 +1 rcmdcheck/tests/testthat/_snaps/parse.md0000644000176200001440000003163614123042677020135 0ustar liggesusers# install log is captured [plain] Code print(check) Output -- R CMD check results ----------------------------------- RSQLServer 0.3.0 ---- Duration: 0ms > checking whether package `RSQLServer' can be installed ... ERROR See below... -- Install failure ------------------------------------------------------------- * installing *source* package `RSQLServer' ... ** package `RSQLServer' successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so': dlopen(/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so Reason: image not found ERROR: lazy loading failed for package `RSQLServer' * removing `/Users/hadley/Documents/dplyr/dbplyr/revdep/checks/RSQLServer/new/RSQLServer.Rcheck/RSQLServer' 1 error x | 0 warnings v | 0 notes v # install log is captured [ansi] Code print(check) Output -- R CMD check results ----------------------------------- RSQLServer 0.3.0 ---- Duration: 0ms > checking whether package `RSQLServer' can be installed ... ERROR See below... -- Install failure ------------------------------------------------------------- * installing *source* package `RSQLServer' ... ** package `RSQLServer' successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so': dlopen(/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so Reason: image not found ERROR: lazy loading failed for package `RSQLServer' * removing `/Users/hadley/Documents/dplyr/dbplyr/revdep/checks/RSQLServer/new/RSQLServer.Rcheck/RSQLServer' 1 error x | 0 warnings v | 0 notes v # install log is captured [unicode] Code print(check) Output ── R CMD check results ─────────────────────────────────── RSQLServer 0.3.0 ──── Duration: 0ms ❯ checking whether package `RSQLServer' can be installed ... ERROR See below... ── Install failure ───────────────────────────────────────────────────────────── * installing *source* package `RSQLServer' ... ** package `RSQLServer' successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so': dlopen(/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so Reason: image not found ERROR: lazy loading failed for package `RSQLServer' * removing `/Users/hadley/Documents/dplyr/dbplyr/revdep/checks/RSQLServer/new/RSQLServer.Rcheck/RSQLServer' 1 error ✖ | 0 warnings ✔ | 0 notes ✔ # install log is captured [fancy] Code print(check) Output ── R CMD check results ─────────────────────────────────── RSQLServer 0.3.0 ──── Duration: 0ms ❯ checking whether package `RSQLServer' can be installed ... ERROR See below... ── Install failure ───────────────────────────────────────────────────────────── * installing *source* package `RSQLServer' ... ** package `RSQLServer' successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so': dlopen(/Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Users/hadley/Documents/dplyr/dbplyr/revdep/library/RSQLServer/rJava/libs/rJava.so Reason: image not found ERROR: lazy loading failed for package `RSQLServer' * removing `/Users/hadley/Documents/dplyr/dbplyr/revdep/checks/RSQLServer/new/RSQLServer.Rcheck/RSQLServer' 1 error ✖ | 0 warnings ✔ | 0 notes ✔ # test failures are captured [plain] Code print(check) Output -- R CMD check results ---------------------------- dataonderivatives 0.3.0 ---- Duration: 0ms > checking tests ... ERROR See below... > checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘stats’ All declared Imports should be used. -- Test failures ------------------------------------------------- testthat ---- > library(testthat) > library(dataonderivatives) > > test_check("dataonderivatives") 1. Failure: BSDR API accesible (@test-bsdr.R#6) -------------------------------- `df1` inherits from `NULL` not `data.frame`. 2. Failure: BSDR API accesible (@test-bsdr.R#8) -------------------------------- `df2` inherits from `NULL` not `data.frame`. 3. Failure: BSDR API accesible (@test-bsdr.R#9) -------------------------------- nrow(df1) <= nrow(df2) isn't true. 4. Failure: CME SDR file parses (@test-cme.R#22) ------------------------------- nrow(cme(lubridate::ymd(20161213), "FX")) > 0 isn't true. testthat results ================================================================ OK: 23 SKIPPED: 0 FAILED: 4 1. Failure: BSDR API accesible (@test-bsdr.R#6) 2. Failure: BSDR API accesible (@test-bsdr.R#8) 3. Failure: BSDR API accesible (@test-bsdr.R#9) 4. Failure: CME SDR file parses (@test-cme.R#22) Error: testthat unit tests failed Execution halted 1 error x | 0 warnings v | 1 note x # test failures are captured [ansi] Code print(check) Output -- R CMD check results ---------------------------- dataonderivatives 0.3.0 ---- Duration: 0ms > checking tests ... ERROR See below... > checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘stats’ All declared Imports should be used. -- Test failures ------------------------------------------------- testthat ---- > library(testthat) > library(dataonderivatives) > > test_check("dataonderivatives") 1. Failure: BSDR API accesible (@test-bsdr.R#6) -------------------------------- `df1` inherits from `NULL` not `data.frame`. 2. Failure: BSDR API accesible (@test-bsdr.R#8) -------------------------------- `df2` inherits from `NULL` not `data.frame`. 3. Failure: BSDR API accesible (@test-bsdr.R#9) -------------------------------- nrow(df1) <= nrow(df2) isn't true. 4. Failure: CME SDR file parses (@test-cme.R#22) ------------------------------- nrow(cme(lubridate::ymd(20161213), "FX")) > 0 isn't true. testthat results ================================================================ OK: 23 SKIPPED: 0 FAILED: 4 1. Failure: BSDR API accesible (@test-bsdr.R#6) 2. Failure: BSDR API accesible (@test-bsdr.R#8) 3. Failure: BSDR API accesible (@test-bsdr.R#9) 4. Failure: CME SDR file parses (@test-cme.R#22) Error: testthat unit tests failed Execution halted 1 error x | 0 warnings v | 1 note x # test failures are captured [unicode] Code print(check) Output ── R CMD check results ──────────────────────────── dataonderivatives 0.3.0 ──── Duration: 0ms ❯ checking tests ... ERROR See below... ❯ checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘stats’ All declared Imports should be used. ── Test failures ───────────────────────────────────────────────── testthat ──── > library(testthat) > library(dataonderivatives) > > test_check("dataonderivatives") 1. Failure: BSDR API accesible (@test-bsdr.R#6) -------------------------------- `df1` inherits from `NULL` not `data.frame`. 2. Failure: BSDR API accesible (@test-bsdr.R#8) -------------------------------- `df2` inherits from `NULL` not `data.frame`. 3. Failure: BSDR API accesible (@test-bsdr.R#9) -------------------------------- nrow(df1) <= nrow(df2) isn't true. 4. Failure: CME SDR file parses (@test-cme.R#22) ------------------------------- nrow(cme(lubridate::ymd(20161213), "FX")) > 0 isn't true. testthat results ================================================================ OK: 23 SKIPPED: 0 FAILED: 4 1. Failure: BSDR API accesible (@test-bsdr.R#6) 2. Failure: BSDR API accesible (@test-bsdr.R#8) 3. Failure: BSDR API accesible (@test-bsdr.R#9) 4. Failure: CME SDR file parses (@test-cme.R#22) Error: testthat unit tests failed Execution halted 1 error ✖ | 0 warnings ✔ | 1 note ✖ # test failures are captured [fancy] Code print(check) Output ── R CMD check results ──────────────────────────── dataonderivatives 0.3.0 ──── Duration: 0ms ❯ checking tests ... ERROR See below... ❯ checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘stats’ All declared Imports should be used. ── Test failures ───────────────────────────────────────────────── testthat ──── > library(testthat) > library(dataonderivatives) > > test_check("dataonderivatives") 1. Failure: BSDR API accesible (@test-bsdr.R#6) -------------------------------- `df1` inherits from `NULL` not `data.frame`. 2. Failure: BSDR API accesible (@test-bsdr.R#8) -------------------------------- `df2` inherits from `NULL` not `data.frame`. 3. Failure: BSDR API accesible (@test-bsdr.R#9) -------------------------------- nrow(df1) <= nrow(df2) isn't true. 4. Failure: CME SDR file parses (@test-cme.R#22) ------------------------------- nrow(cme(lubridate::ymd(20161213), "FX")) > 0 isn't true. testthat results ================================================================ OK: 23 SKIPPED: 0 FAILED: 4 1. Failure: BSDR API accesible (@test-bsdr.R#6) 2. Failure: BSDR API accesible (@test-bsdr.R#8) 3. Failure: BSDR API accesible (@test-bsdr.R#9) 4. Failure: CME SDR file parses (@test-cme.R#22) Error: testthat unit tests failed Execution halted 1 error ✖ | 0 warnings ✔ | 1 note ✖ rcmdcheck/tests/testthat/_snaps/callback.md0000644000176200001440000010631614123042676020554 0ustar liggesusers# block_callback by line Code for (line in chk) cb(paste0(line, "\n")) Output - using log directory '/tmp/RtmpoYWa4I/file31fc5a857856/mlr.Rcheck' - using R version 3.5.0 (2017-01-27) - using platform: x86_64-pc-linux-gnu (64-bit) - using session charset: UTF-8 v checking for file 'mlr/DESCRIPTION' - this is package 'mlr' version '2.13' - package encoding: UTF-8 v checking package namespace information N checking package dependencies Package suggested but not available for checking: 'elmNN' v checking if this is a source package v checking if there is a namespace v checking for executable files v checking for hidden files and directories v checking for portable file names v checking for sufficient/correct file permissions - checking whether package 'mlr' can be installed ... [22s/22s] OK N checking installed package size installed size is 6.5Mb sub-directories of 1Mb or more: data 3.3Mb R 2.0Mb v checking package directory v checking 'build' directory v checking DESCRIPTION meta-information v checking top-level files v checking for left-over files v checking index information v checking package subdirectories v checking R files for non-ASCII characters v checking R files for syntax errors v checking whether the package can be loaded v checking whether the package can be loaded with stated dependencies v checking whether the package can be unloaded cleanly v checking whether the namespace can be loaded with stated dependencies v checking whether the namespace can be unloaded cleanly v checking loading without being on the library search path N checking dependencies in R code Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m v checking S3 generic/method consistency v checking replacement functions v checking foreign function calls - checking R code for possible problems ... [34s/34s] OK v checking Rd files v checking Rd metadata v checking Rd cross-references v checking for missing documentation entries v checking for code/documentation mismatches v checking Rd \usage sections v checking Rd contents v checking for unstated dependencies in examples v checking contents of 'data' directory v checking data for non-ASCII characters v checking data for ASCII and uncompressed saves v checking line endings in C/C++/Fortran sources/headers v checking compiled code v checking installed files from 'inst/doc' v checking files in 'vignettes' - checking examples ... [18s/28s] OK v checking for unstated dependencies in 'tests' - checking tests Running the tests in 'tests/run-classif1.R' failed. Last 999 lines of output: burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building BART in 0.013 sec burning and aggregating chains from all threads... done building BART with mem-cache speedup... Iteration 100/1250 Iteration 200/1250 Iteration 300/1250 Iteration 400/1250 Iteration 500/1250 Iteration 600/1250 Iteration 700/1250 Iteration 800/1250 Iteration 900/1250 Iteration 1000/1250 Iteration 1100/1250 Iteration 1200/1250 done building BART in 0.551 sec burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building BART in 0.028 sec burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building BART in 0.014 sec burning and aggregating chains from all threads... done -- 1. Error: classif_blackboost (@test_classif_blackboost.R#32) --------------- no method for assigning subsets of this S4 class 1: do.call(mboost::blackboost, pars) at testthat/test_classif_blackboost.R:32 2: (function (formula, data = list(), weights = NULL, na.action = na.pass, offset = NULL, family = Gaussian(), control = boost_control(), oobweights = NULL, tree_controls = partykit::ctree_control(teststat = "quad", testtype = "Teststatistic", mincriterion = 0, minsplit = 10, minbucket = 4, maxdepth = 2, saveinfo = FALSE), ...) { cl <- match.call() mf <- match.call(expand.dots = FALSE) m <- match(c("formula", "data", "weights", "na.action"), names(mf), 0L) mf <- mf[c(1L, m)] mf$drop.unused.levels <- TRUE mf[[1L]] <- quote(stats::model.frame) mf <- eval(mf, parent.frame()) response <- model.response(mf) weights <- model.weights(mf) mf <- mf[, -1, drop = FALSE] mf$"(weights)" <- NULL bl <- list(btree(mf, tree_controls = tree_controls)) ret <- mboost_fit(bl, response = response, weights = weights, offset = offset, family = family, control = control, oobweights = oobweights, ...) ret$call <- cl Error: testthat unit tests failed Execution halted v checking for unstated dependencies in vignettes v checking package vignettes in 'inst/doc' - checking running R code from vignettes 'mlr.Rmd' using 'UTF-8' ... [0s/0s] OK NONE - checking re-building of vignette outputs ... [3s/4s] OK v checking PDF version of manual # block_callback by chunks Code for (ch in chunks) cb(ch) Output - using log directory '/tmp/RtmpoYWa4I/file31fc5a857856/mlr.Rcheck' - using R version 3.5.0 (2017-01-27) - using platform: x86_64-pc-linux-gnu (64-bit) - using session charset: UTF-8 v checking for file 'mlr/DESCRIPTION' - this is package 'mlr' version '2.13' - package encoding: UTF-8 v checking package namespace information N checking package dependencies Package suggested but not available for checking: 'elmNN' v checking if this is a source package v checking if there is a namespace v checking for executable files v checking for hidden files and directories v checking for portable file names v checking for sufficient/correct file permissions - checking whether package 'mlr' can be installed ... [22s/22s] OK N checking installed package size installed size is 6.5Mb sub-directories of 1Mb or more: data 3.3Mb R 2.0Mb v checking package directory v checking 'build' directory v checking DESCRIPTION meta-information v checking top-level files v checking for left-over files v checking index information v checking package subdirectories v checking R files for non-ASCII characters v checking R files for syntax errors v checking whether the package can be loaded v checking whether the package can be loaded with stated dependencies v checking whether the package can be unloaded cleanly v checking whether the namespace can be loaded with stated dependencies v checking whether the namespace can be unloaded cleanly v checking loading without being on the library search path chec N checking dependencies in R code Picked up _JAVA_OPTI Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m v checking S3 generic/method consistency v checking replacement functions checking foreign func v checking foreign function calls - checking R code for possible problems ... [34s/34s] OK checking Rd files ... O v checking Rd files v checking Rd metadata v checking Rd cross-references v checking for missing documentation entries v checking for code/documentation mismatches v checking Rd \usage sections v checking Rd contents v checking for unstated dependencies in examples v checking contents of 'data' directory v checking data for non-ASCII characters v checking data for ASCII and uncompressed saves checking line endings in C/C++/Fortran s v checking line endings in C/C++/Fortran sources/headers checking compiled code ... OK v checking compiled code v checking installed files from 'inst/doc' v checking files in 'vignettes' - checking examples ... [18s/28s] OK v checking for unstated dependencies in 'tests' - checking tests Running the tests in 't Running the tests in 'tests/run-classif1.R' failed. Last 999 lines of output: burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building BART in 0.013 sec burning and aggregating chains from all threads... done building building BART with mem-cache speedup... Iteration 100/1250 Iteration 200/1250 Iteration 300/1250 Iteration 400/1250 Iteration 5 Iteration 500/1250 Iteration 600/1250 Iterat Iteration 700/1250 Iteration 800/1250 Iteration 900/1250 Iteration 1000/1250 Iteration 1100/1250 Iteration 1200/1250 done building BART in 0.551 sec burning and aggregating ch burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building BART in 0.028 sec burning and aggregating chains from all threads... done building BART with mem-cache speedup... done building B done building BART in 0.014 sec burning and aggregating chains from all threads... done -- 1. Error: classif_blackboost (@test_classif_blackboost.R#32) --------------- no method for assigning subsets of this S4 class 1: do.call(mboost::blackboost, pars) 1: do.call(mboost::blackboost, pars) at testthat/test_classif_blackboost.R:32 2: (function (formula, data = list(), weights = NULL, na.action = na.pass, offset = NULL, family = Gaussian(), control = boost_control(), oobweights = NULL, tree_controls = partykit::ctree_control(teststat = "quad", testtype = "Teststatistic", mincriterion = 0, minsplit = 10, minbucket = 4, maxdepth = 2, saveinfo = FALSE), ...) { cl <- ma cl <- match.call() mf <- match.call(expand.dots = FALSE) m <- match(c("formula", "data", "weights", "na.action"), names(mf), 0L) mf <- mf[c(1L, m)] mf$drop.unu mf$drop.unused.levels <- TRUE mf[[1L]] <- quote(stats::model.frame) mf <- eval(mf, parent.frame()) response <- model.response(mf) weights <- model.weights(mf) mf <- mf[, -1, drop = FALSE] mf$"(weights)" <- NULL bl <- list(btree(mf, tree_controls bl <- list(btree(mf, tree_controls = tree_controls)) re ret <- mboost_fit(bl, response = response, weights = weights, offset = offset, family = family, control = control, oobweights = oobweights, ...) ret$call ret$call <- cl Error: testthat unit tests failed Execution halted v checking for unstated dependencies in vignettes v checking package vignettes in 'inst/doc' - checking running R code from vignettes 'mlr.Rmd' using 'UTF-8' ... [0s/0s] OK NONE - checking re-building of vignette outputs ... [3s/4s] OK checking PDF vers v checking PDF version of manual # notes, errors, warnings Code for (line in out) cb(line) Output N Step one More note text. W Step two More warning text. E Step three More error text. # tests Code for (line in txt) cb(paste0(line, "\n")) Output v checking for unstated dependencies in 'tests' E checking tests Running 'testthat.R' Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(lpirfs) > > test_check("lpirfs") Error in parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") : test-diagnost_ols.R:19:8: unexpected $end 18: 19: lm_mode ^ Calls: test_check ... doWithOneRestart -> force -> lapply -> FUN -> source_file -> parse Execution halted v checking for unstated dependencies in vignettes # multi-arch tests Code for (line in txt) cb(paste0(line, "\n")) Output v checking for unstated dependencies in 'tests' - checking tests -- running tests for arch 'i386' ... [2s] ERROR Running the tests in 'tests/testthat.R' failed. Complete output: > library("testthat") > library("GMSE") > > test_check("GMSE") -- running tests for arch 'x64' ... [3s] OK * checking for unstated dependencies in vignettes ... OK # multiple test file run times are measured properly Code out Output [1] " \r checking examples ... \r \rv checking examples (5s)" [2] "\r \rv checking for unstated dependencies in 'tests'" [3] "\r \r- checking tests" [4] "\r \r Running 'first_edition.R'\r \r\r \rv Running 'first_edition.R' (13.2s)" [5] " Running 'second_edition.R'\r \r\r \rv Running 'second_edition.R' (14.3s)" [6] "\r \rv checking for unstated dependencies in vignettes" [7] "\r \rv checking package vignettes in 'inst/doc'" [8] "\r" # multi-arch test cases Code out Output [1] " \r- using log directory 'C:/Users/csard/works/ps.Rcheck'" [2] "\r \r- using R version 4.1.1 (2021-08-10)" [3] "\r \r- using platform: x86_64-w64-mingw32 (64-bit)" [4] "\r \r- using session charset: ISO8859-1" [5] "\r \rv checking for file 'ps/DESCRIPTION'" [6] "\r \r- this is package 'ps' version '1.3.2.9000'" [7] "\r \rv checking for unstated dependencies in 'tests'" [8] "\r \r- checking tests" [9] "\r \r-- running tests for arch 'i386' " [10] "\r \r\r \rv Running 'testthat.R'" [11] "\r \r-- running tests for arch 'x64' " [12] "\r \r\r \rv Running 'testthat.R'" [13] "\r \rv checking PDF version of manual" [14] "\r \r\r" # failed test case Code out Output [1] " \rv checking for unstated dependencies in 'tests'" [2] "\r \r- checking tests" [3] "\r \r\r \rE Running 'testthat.R'" [4] "\r \r Running the tests in 'tests/testthat.R' failed." [5] "\r \r Last 13 lines of output:" [6] "\r \r / | 0 | windows " [7] "\r \r / | 0 | winver " [8] "\r \r / | 0 | winver " [9] "\r \r v | 6 | winver" [10] "\r \r " [11] "\r \r == Results =====================================================================" [12] "\r \r Duration: 13.5 s" [13] "\r \r " [14] "\r \r -- Skipped tests --------------------------------------------------------------" [15] "\r \r * Needs working IPv6 connection (2)" [16] "\r \r * On CRAN (13)" [17] "\r \r " [18] "\r \r [ FAIL 1 | WARN 0 | SKIP 15 | PASS 367 ]" [19] "\r \r Error: Test failures" [20] "\r \r Execution halted" [21] "\r \rv checking PDF version of manual" [22] "\r \r\r" # comparing test output Code out Output [1] " \rv checking for unstated dependencies in 'tests'" [2] "\r \r- checking tests" [3] "\r \r\r \rv Running 'first_edition.R'" [4] "\r \rv Running 'second_edition.R'" [5] "\r \rv Running 'spelling.R'" [6] "X Comparing 'spelling.Rout' to 'spelling.Rout.save'" [7] " 6,8d5" [8] "\r \r < Potential spelling errors:" [9] "\r \r < WORD FOUND IN" [10] "\r \r < programatically NEWS.md:14" [11] "\r \r\r \rv checking for unstated dependencies in vignettes" [12] "\r \rv checking package vignettes in 'inst/doc'" [13] "\r" # partial comparing line Code out Output [1] " \r- checking tests" [2] "\r \r\r \rv Running 'test-1.R'" [3] " Comparing 'test-1.Rout' to \r \rv Comparing 'test-1.Rout' to 'test-1.Rout.save'" [4] "\r \r\r \rv Running 'test-2.R'" [5] "v Comparing 'test-2.Rout' to 'test-2.Rout.save'" [6] "\r \r\r \rv checking PDF version of manual" [7] "\r \r\r" # multiple comparing blocks Code out Output [1] " \rv checking examples" [2] "\r \rv checking for unstated dependencies in 'tests'" [3] "\r \r- checking tests" [4] "\r \r\r \rv Running 'test-1.R'" [5] "v Comparing 'test-1.Rout' to 'test-1.Rout.save'" [6] "\r \r\r \rv Running 'test-2.R'" [7] "v Comparing 'test-2.Rout' to 'test-2.Rout.save'" [8] "\r \r\r \rv Running 'test.R'" [9] "X Comparing 'test.Rout' to 'test.Rout.save'" [10] " 1,4d0" [11] "\r \r <" [12] "\r \r <" [13] "\r \r < >" [14] "\r \r < > cat(\"This is the output.\\n\")" [15] "\r \r 6d1" [16] "\r \r < >" [17] "\r \r\r \r " [18] "\r \rE" [19] "\r \r Running the tests in 'tests/testthat.R' failed." [20] "\r \r Last 13 lines of output:" [21] "\r \r + ## ps does not support this platform" [22] "\r \r + reporter <- \"progress\"" [23] "\r \r + }" [24] "\r \r >" [25] "\r \r > if (ps_is_supported()) test_check(\"ps\", reporter = reporter)" [26] "\r \r cleanup-reporter:" [27] "\r \r cleanup testthat reporter: ......................................................................................................................................" [28] "\r \r common:" [29] "\r \r common: ...................................................................................................................................................." [30] "\r \r connections:" [31] "\r \r connections: ................................................................S............S............" [32] "\r \r finished:" [33] "\r \r process finished: ..................................................................................." [34] "\r \r kill-tree:" [35] "\r \r kill-tree: ..............................................." [36] "\r \rv checking PDF version of manual" [37] "\r" # simple_callback Code out Output [1] "* using log directory '/private/tmp/readr.Rcheck'" [2] "* using R version 4.1.0 (2021-05-18)" [3] "* using platform: x86_64-apple-darwin17.0 (64-bit)" [4] "* using session charset: UTF-8" [5] "* checking for file 'readr/DESCRIPTION' ... OK" [6] "* this is package 'readr' version '2.0.1.9000'" [7] "* package encoding: UTF-8" [8] "* checking package namespace information ... OK" [9] "* checking package dependencies ... OK" [10] "* checking if this is a source package ... OK" [11] "* checking if there is a namespace ... OK" [12] "* checking for executable files ... OK" [13] "* checking for hidden files and directories ... OK" [14] "* checking for portable file names ... OK" [15] "* checking for sufficient/correct file permissions ... OK" [16] "* checking whether package 'readr' can be installed ... OK" [17] "* checking installed package size ... OK" [18] "* checking package directory ... OK" [19] "* checking 'build' directory ... OK" [20] "* checking DESCRIPTION meta-information ... OK" [21] "* checking top-level files ... OK" [22] "* checking for left-over files ... OK" [23] "* checking index information ... OK" [24] "* checking package subdirectories ... OK" [25] "* checking R files for non-ASCII characters ... OK" [26] "* checking R files for syntax errors ... OK" [27] "* checking whether the package can be loaded ... OK" [28] "* checking whether the package can be loaded with stated dependencies ... OK" [29] "* checking whether the package can be unloaded cleanly ... OK" [30] "* checking whether the namespace can be loaded with stated dependencies ... OK" [31] "* checking whether the namespace can be unloaded cleanly ... OK" [32] "* checking loading without being on the library search path ... OK" [33] "* checking dependencies in R code ... OK" [34] "* checking S3 generic/method consistency ... OK" [35] "* checking replacement functions ... OK" [36] "* checking foreign function calls ... OK" [37] "* checking R code for possible problems ... OK" [38] "* checking Rd files ... OK" [39] "* checking Rd metadata ... OK" [40] "* checking Rd cross-references ... OK" [41] "* checking for missing documentation entries ... OK" [42] "* checking for code/documentation mismatches ... OK" [43] "* checking Rd \\usage sections ... OK" [44] "* checking Rd contents ... OK" [45] "* checking for unstated dependencies in examples ... OK" [46] "* checking R/sysdata.rda ... OK" [47] "* checking line endings in C/C++/Fortran sources/headers ... OK" [48] "* checking compiled code ... OK" [49] "* checking installed files from 'inst/doc' ... OK" [50] "* checking files in 'vignettes' ... OK" [51] "* checking examples ... OK" [52] "* checking for unstated dependencies in 'tests' ... OK" [53] "* checking tests ..." [54] " Running 'first_edition.R'" [55] " Running 'second_edition.R'" [56] " Running 'spelling.R'" [57] " Comparing 'spelling.Rout' to 'spelling.Rout.save' ...6,8d5" [58] "< Potential spelling errors:" [59] "< WORD FOUND IN" [60] "< programatically NEWS.md:14" [61] " OK" [62] "* checking for unstated dependencies in vignettes ... OK" [63] "* checking package vignettes in 'inst/doc' ... OK" [64] "* checking running R code from vignettes ..." [65] " 'locales.Rmd' using 'UTF-8'... OK" [66] " 'readr.Rmd' using 'UTF-8'... OK" [67] " NONE" [68] "* checking re-building of vignette outputs ... OK" [69] "* checking PDF version of manual ... OK" [70] "* DONE" [71] "" [72] "Status: OK" # multiple tests Code out Output [1] " \r- checking examples ... NONE" [2] "\r \rv checking for unstated dependencies in 'tests'" [3] "\r \r- checking tests" [4] "\r \r\r \r- Running 'a.R'" [5] "\r \r- Running 'b.R'" [6] "\r \r- Running 'c.R'" [7] "E Some test files failed" [8] "\r \r Running the tests in 'tests/b.R' failed." [9] "\r \r Complete output:" [10] "\r \r > stop(\"error\")" [11] "\r \r Error: error" [12] "\r \r Execution halted" [13] "\r \rv checking PDF version of manual" [14] "\r" --- Code out Output [1] " \r- checking examples ... NONE" [2] "\r \rv checking for unstated dependencies in 'tests'" [3] "\r \r- checking tests" [4] "\r \r\r \rv Running 'a.R'" [5] "\r \rE Running 'b.R'" [6] "\r \r Running the tests in 'tests/b.R' failed." [7] "\r \r Complete output:" [8] "\r \r > stop(\"error\")" [9] "\r \r Error: error" [10] "\r \r Execution halted" [11] "\r \rv checking PDF version of manual" [12] "\r" rcmdcheck/tests/testthat/_snaps/utils.md0000644000176200001440000000052114123042764020145 0ustar liggesusers# as_flag Code as_flag("boo", FALSE) Warning Invalid option value: `boo`, must be TRUE or FALSE Output [1] FALSE --- Code as_flag("boo", TRUE, "thisthat") Warning Invalid `thisthat` option value: `boo`, must be TRUE or FALSE Output [1] TRUE rcmdcheck/tests/testthat/REDCapR-ok.log0000644000176200001440000000506113146514764017506 0ustar liggesusers* using log directory ‘/Users/hadley/Documents/web/httr/revdep/checks/REDCapR/old/REDCapR.Rcheck’ * using R version 3.4.1 (2017-06-30) * using platform: x86_64-apple-darwin15.6.0 (64-bit) * using session charset: UTF-8 * checking for file ‘REDCapR/DESCRIPTION’ ... OK * this is package ‘REDCapR’ version ‘0.9.8’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘REDCapR’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... OK Running ‘test-all.R’ * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking running R code from vignettes ... NONE * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * DONE Status: OK rcmdcheck/tests/testthat/test-color.R0000644000176200001440000000112114120347676017422 0ustar liggesusers test_that("colors can be turned on and off", { # clean up state withr::local_options(rcmdcheck.num_colors = NULL) withr::local_envvar(RCMDCHECK_NUM_COLORS = NA_character_) # by default let cli decide withr:::local_options(cli.num_colors = 100) expect_equal(rcmdcheck_color(cli::num_ansi_colors)(), 100) # env var overrides withr::local_envvar(RCMDCHECK_NUM_COLORS = 200) expect_equal(rcmdcheck_color(cli::num_ansi_colors)(), 200) # option overrides that withr::local_options(rcmdcheck.num_colors = 300) expect_equal(rcmdcheck_color(cli::num_ansi_colors)(), 300) }) rcmdcheck/tests/testthat/test-auto_clean.R0000644000176200001440000000023514120347676020423 0ustar liggesusers test_that("auto_clean deletes files on gc()", { tmp <- tempfile() writeLines("abc", tmp) auto_clean(tmp) gc() expect_false(file.exists(tmp)) }) rcmdcheck/tests/testthat/bad3/0000755000176200001440000000000014123042675016014 5ustar liggesusersrcmdcheck/tests/testthat/bad3/NAMESPACE0000644000176200001440000000007614120347676017244 0ustar liggesusers# Generated by roxygen2: do not edit by hand export(foobar2) rcmdcheck/tests/testthat/bad3/man/0000755000176200001440000000000014120347676016575 5ustar liggesusersrcmdcheck/tests/testthat/bad3/man/foobar2.Rd0000644000176200001440000000031214120347676020412 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package.R \name{foobar2} \alias{foobar2} \title{foobar2} \usage{ foobar2() } \description{ foobar2 } \examples{ foobar2() } rcmdcheck/tests/testthat/bad3/DESCRIPTION0000644000176200001440000000065014120347676017531 0ustar liggesusersPackage: badpackage Title: Advice on R package building Date: 2016 February Version: 1.0.0 Author: Gabor Csardi Maintainer: Gabor Csardi Description: Give advice about good practices when building R packages. License: GPL Suggests: testthat, knitr, rmarkdown, svglite RoxygenNote: 6.1.0 Repository: CRAN Encoding: UTF-8 VignetteBuilder: knitr Config/build/clean-inst-doc: FALSE rcmdcheck/tests/testthat/bad3/tests/0000755000176200001440000000000014120347676017164 5ustar liggesusersrcmdcheck/tests/testthat/bad3/tests/testthat/0000755000176200001440000000000014124357312021014 5ustar liggesusersrcmdcheck/tests/testthat/bad3/tests/testthat/test-bad.R0000644000176200001440000000012014122660375022637 0ustar liggesuserscontext("bad") test_that("good", { expect_true(TRUE) expect_true(FALSE) }) rcmdcheck/tests/testthat/bad3/tests/testthat.R0000644000176200001440000000010014120347676021136 0ustar liggesuserslibrary(testthat) library(badpackage) test_check("badpackage") rcmdcheck/tests/testthat/bad3/vignettes/0000755000176200001440000000000014120347676020032 5ustar liggesusersrcmdcheck/tests/testthat/bad3/vignettes/test.Rmd0000644000176200001440000000111714120347676021455 0ustar liggesusers--- title: "Test vignette for rcmdcheck" author: "Bugs Bunny" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Test vignette for rcmdcheck} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- Perspiciatis qui earum nesciunt tempore mollitia aliquid. Error iusto doloribus occaecati error. Alias rerum voluptas illo esse et rerum. Officiis aut et eligendi quia quo. Culpa inventore dicta soluta debitis ex. ```{r dev = "svglite"} outfile <- Sys.getenv("RCMDBUILD_OUTPUT", "") if (nzchar(outfile)) saveRDS(.libPaths(), outfile) ``` rcmdcheck/tests/testthat/bad3/R/0000755000176200001440000000000014120347676016223 5ustar liggesusersrcmdcheck/tests/testthat/bad3/R/package.R0000644000176200001440000000033614120347676017743 0ustar liggesusers foobar <- function(argument) { argument } #' foobar2 #' @export #' @examples #' foobar2() foobar2 <- function() { outfile <- Sys.getenv("RCMDCHECK_OUTPUT", "") if (nzchar(outfile)) saveRDS(.libPaths(), outfile) } rcmdcheck/tests/testthat/test-utils.R0000644000176200001440000000265614121400322017435 0ustar liggesusers test_that("as_flag", { expect_true(as_flag("true")) expect_true(as_flag("TRUE")) expect_true(as_flag(TRUE)) expect_true(as_flag(1)) expect_true(as_flag(NA, TRUE)) expect_false(as_flag("false")) expect_false(as_flag("FALSE")) expect_false(as_flag(FALSE)) expect_false(as_flag(0)) expect_false(as_flag(NA, FALSE)) expect_warning( expect_false(as_flag("boo", FALSE)), "Invalid" ) expect_warning( expect_true(as_flag("boo", TRUE)), "Invalid" ) expect_snapshot( as_flag("boo", FALSE) ) expect_snapshot( as_flag("boo", TRUE, "thisthat") ) }) test_that("should_use_rs_pandoc", { withr::local_envvar(RCMDCHECK_USE_RSTUDIO_PANDOC = "false") expect_false(should_use_rs_pandoc()) withr::local_envvar(RCMDCHECK_USE_RSTUDIO_PANDOC = "true") expect_true(should_use_rs_pandoc()) withr::local_envvar(RCMDCHECK_USE_RSTUDIO_PANDOC = NA_character_) mockery::stub(should_use_rs_pandoc, "Sys.which", "") withr::local_envvar(RSTUDIO_PANDOC = "yes") expect_true(should_use_rs_pandoc()) withr::local_envvar(RSTUDIO_PANDOC = NA_character_) expect_false(should_use_rs_pandoc()) mockery::stub(should_use_rs_pandoc, "Sys.which", "pandoc") withr::local_envvar(RSTUDIO_PANDOC = "yes") expect_false(should_use_rs_pandoc()) }) test_that("read_char and files with invalid encodings", { expect_silent( txt <- read_char(test_path("fixtures", "badenc.fail"), encoding = "UTF-8") ) }) rcmdcheck/tests/testthat/bad2/0000755000176200001440000000000013447166631016022 5ustar liggesusersrcmdcheck/tests/testthat/bad2/NAMESPACE0000644000176200001440000000005513142421221017216 0ustar liggesusers# Generated by roxygen2: do not edit by hand rcmdcheck/tests/testthat/bad2/DESCRIPTION0000644000176200001440000000051313447166631017527 0ustar liggesusersPackage: badpackage Title: Advice on R package building Date: 2016 February Version: 1.0.0 Author: Gabor Csardi Maintainer: Gabor Csardi Description: Give advice about good practices when building R packages. License: Public domain Suggests: testthat RoxygenNote: 5.0.1 biocViews: GraphAndNetwork rcmdcheck/tests/testthat/bad2/R/0000755000176200001440000000000013142421221016200 5ustar liggesusersrcmdcheck/tests/testthat/bad2/R/package.R0000644000176200001440000000005113142421221017712 0ustar liggesusers This will clearly fail at install time! rcmdcheck/tests/testthat/test-http.R0000644000176200001440000000213014122660375017260 0ustar liggesusers if (!identical(Sys.getenv("NOT_CRAN"), "true")) return() if (!isTRUE(as.logical(Sys.getenv("EXTRA_TESTS")))) return() if (getRversion() < "3.6.0") return() httpbin <- webfakes::new_app_process(webfakes::httpbin_app()) torture_me <- function(expr) { out <- tryCatch( withCallingHandlers({ p <- callr::r_bg(function(pid, num = 1000) { Sys.sleep(1) for (i in 1:num) { ps::ps_interrupt(ps::ps_handle(pid)) Sys.sleep(0.01) } }, list(pid = Sys.getpid())) expr }, interrupt = function(cnd) { cat("int\n") ; invokeRestart("resume") }), error = function(err) err ) p$kill() out } test_that("http interrupts", { withr::local_options(cli.progress_handlers_only = "logger") dl <- function() { download_files( httpbin$url("/drip", query = c(duration =5, numbytes = 1000)), tmp <- tempfile() ) } out <- capture.output(resp <- torture_me(dl())) expect_equal(resp[[1]]$status_code, 200) expect_true(grepl("created", out[1])) expect_true(grepl("done", out[length(out)])) expect_true(any(out == "int")) }) rcmdcheck/tests/testthat/test-crash.R0000644000176200001440000000372314122660375017412 0ustar liggesusers if (!isTRUE(as.logical(Sys.getenv("RCMDCHECK_EXTRA_TESTS")))) return() test_that("check process crashes", { skip_on_cran() if (!ps::ps_is_supported()) skip("Needs working ps") chkdir = tempfile() on.exit(unlink(chkdir, recursive = TRUE), add = TRUE) pkgbuild::without_cache(pkgbuild::local_build_tools()) targz <- build_package( test_path("bad4"), tempfile(), character(), .libPaths(), quiet = TRUE ) pidfile <- tempfile(fileext = ".pid") dbgfile <- tempfile(fileext = ".R") on.exit(unlink(c(pidfile, dbgfile)), add = TRUE) code <- sprintf( "if (! file.exists('%s')) cat(Sys.getpid(), '\\n', file = '%s')\n", encodeString(pidfile), encodeString(pidfile) ) cat(code, file = dbgfile) # Run rcmdcheck() in a subprocess, it will report back in the tmp_out file subchk <- function(path, dbgfile) { rcmdcheck::rcmdcheck(path, env = c(R_TESTS = dbgfile)) } proc <- callr::r_bg(subchk, list(path = targz, dbgfile = dbgfile)) # Wait until the check is running limit <- Sys.time() + as.difftime(10, units = "secs") while (! file.exists(pidfile) && Sys.time() < limit) Sys.sleep(0.1) expect_true(Sys.time() < limit) if (!file.exists(pidfile)) return() # Get a pid for the check process get_pid <- function() { tryCatch(as.integer(readLines(pidfile)), error = function(e) NULL) } limit <- Sys.time() + as.difftime(1, units = "secs") while(!is.integer(pid <- get_pid()) && Sys.time() < limit) Sys.sleep(0.1) expect_true(Sys.time() < limit) if (is.null(pid)) return() # Kill the check process Sys.sleep(1) ps::ps_kill(ps::ps_handle(pid)) # Wait for the rcmdcheck() process to quit limit <- Sys.time() + as.difftime(10, units = "secs") while (proc$is_alive() && Sys.time() < limit) Sys.sleep(0.1) expect_true(Sys.time() < limit) if (proc$is_alive()) { proc$kill() return() } # Result of rcmdcheck() expect_error( res <- proc$get_result(), "R CMD check process failed" ) }) rcmdcheck/tests/testthat.R0000644000176200001440000000012414122606412015315 0ustar liggesuserslibrary(testthat) library(rcmdcheck) test_check("rcmdcheck", reporter = "summary") rcmdcheck/R/0000755000176200001440000000000014123052257012377 5ustar liggesusersrcmdcheck/R/http.R0000644000176200001440000001636014120347676013520 0ustar liggesusers #' @importFrom curl new_pool new_handle handle_setopt multi_add multi_run #' @importFrom cli cli_progress_bar cli_progress_update download_files <- function(urls, destfiles, quiet = FALSE, total_con = 100L, host_con = 15L, handles = NULL) { stopifnot( is.character(urls) && !anyNA(urls), is.character(destfiles) & !anyNA(destfiles), !any(duplicated(destfiles)), length(urls) == length(destfiles), is_count(total_con), is_count(host_con), length(handles) == urls || length(handles) == 0 ) pool <- new_pool(total_con = total_con, host_con = host_con) on.exit(download_files_cleanup(pool, destfiles), add = TRUE) todo <- length(urls) tmpfiles <- paste0(destfiles, ".tmp") if (is.null(handles)) handles <- vector(todo, mode = "list") results <- vector(todo, mode = "list") sizes <- rep(NA_integer_, todo) currents <- rep(0L, todo) finished <- rep(FALSE, todo) done <- function(num, resp) { results[[num]] <<- resp todo <<- todo - 1L finished[[num]] <<- TRUE if (is.na(sizes[[num]])) sizes[[num]] <<- currents[[num]] file.rename(tmpfiles[[num]], destfiles[[num]]) } fail <- function(num, msg) { results[[num]] <<- new_curl_error(num, urls[[num]], msg) todo <<- todo - 1L finished[[num]] <<- TRUE if (is.na(sizes[[num]])) sizes[[num]] <<- currents[[num]] unlink(tmpfiles[[num]], force = TRUE) } prog <- function(num, down, up) { # not possible to download _and_ upload with the same handle, right? if (down[[1]] != 0) sizes[num] <<- down[[1]] if (up[[1]] != 0) sizes[num] <<- up[[1]] currents[[num]] <<- down[[2]] + up[[2]] TRUE } if (!quiet) pbar <- cli_progress_bar(type = "download") prog_update <- function() { cli_progress_update(id = pbar, set = sum(currents), total = sum(sizes)) } lapply(seq_along(urls), function(i) { if (is.null(handles[[i]])) handles[[i]] <<- new_handle() handle_setopt(handles[[i]], url = urls[[i]]) if (!quiet) { handle_setopt( handles[[i]], noprogress = FALSE, progressfunction = function(down, up) prog(i, down, up) ) } multi_add( handles[[i]], done = function(resp) done(i, resp), fail = function(msg) fail(i, msg), data = tmpfiles[[i]], pool = pool ) }) if (getRversion() < "3.6.0") suspendInterrupts <- identity repeat { if (todo == 0) break; suspendInterrupts( multi_run(0.1, poll = TRUE, pool = pool) ) if (!quiet) prog_update() } results } #' @importFrom curl multi_list multi_cancel download_files_cleanup <- function(pool, destfiles) { handles <- multi_list(pool) for (h in handles) { tryCatch(multi_cancel(h), error = function(err) NULL) } tmpfiles <- paste0(destfiles, ".tmp") unlink(tmpfiles, force = TRUE) } new_curl_error <- function(num, url, msg) { structure( list( message = paste0("curl error for ", url, " (#", num, "):", msg), number = num, url = url ), class = c("curl_error", "error", "condition") ) } download_file_lines <- function(url, ...) { tmp <- tempfile() on.exit(unlink(tmp), add = TRUE) resp <- download_files(url, tmp, ...)[[1]] http_stop_for_status(resp) readLines(tmp, warn = FALSE) } http_stop_for_status <- function(resp) { if (!is.integer(resp$status_code)) stop("Not an HTTP response") if (resp$status_code < 300) return(invisible(resp)) stop(http_error(resp)) } http_error <- function(resp, call = sys.call(-1)) { status <- resp$status_code reason <- http_status(status)$reason message <- sprintf("%s (HTTP %d).", reason, status) status_type <- (status %/% 100) * 100 if (length(resp[["content"]]) == 0 && !is.null(resp$file) && file.exists(resp$file)) { tryCatch({ n <- file.info(resp$file, extra_cols = FALSE)$size resp$content <- readBin(resp$file, what = raw(), n = n) }, error = identity) } http_class <- paste0("http_", unique(c(status, status_type, "error"))) structure( list(message = message, call = call, response = resp), class = c(http_class, "http_error", "error", "condition") ) } http_status <- function(status) { status_desc <- http_statuses[as.character(status)] if (is.na(status_desc)) { stop("Unknown http status code: ", status, call. = FALSE) } status_types <- c("Information", "Success", "Redirection", "Client error", "Server error") status_type <- status_types[[status %/% 100]] # create the final information message message <- paste(status_type, ": (", status, ") ", status_desc, sep = "") list( category = status_type, reason = status_desc, message = message ) } http_statuses <- c( "100" = "Continue", "101" = "Switching Protocols", "102" = "Processing (WebDAV; RFC 2518)", "200" = "OK", "201" = "Created", "202" = "Accepted", "203" = "Non-Authoritative Information", "204" = "No Content", "205" = "Reset Content", "206" = "Partial Content", "207" = "Multi-Status (WebDAV; RFC 4918)", "208" = "Already Reported (WebDAV; RFC 5842)", "226" = "IM Used (RFC 3229)", "300" = "Multiple Choices", "301" = "Moved Permanently", "302" = "Found", "303" = "See Other", "304" = "Not Modified", "305" = "Use Proxy", "306" = "Switch Proxy", "307" = "Temporary Redirect", "308" = "Permanent Redirect (experimental Internet-Draft)", "400" = "Bad Request", "401" = "Unauthorized", "402" = "Payment Required", "403" = "Forbidden", "404" = "Not Found", "405" = "Method Not Allowed", "406" = "Not Acceptable", "407" = "Proxy Authentication Required", "408" = "Request Timeout", "409" = "Conflict", "410" = "Gone", "411" = "Length Required", "412" = "Precondition Failed", "413" = "Request Entity Too Large", "414" = "Request-URI Too Long", "415" = "Unsupported Media Type", "416" = "Requested Range Not Satisfiable", "417" = "Expectation Failed", "418" = "I'm a teapot (RFC 2324)", "420" = "Enhance Your Calm (Twitter)", "422" = "Unprocessable Entity (WebDAV; RFC 4918)", "423" = "Locked (WebDAV; RFC 4918)", "424" = "Failed Dependency (WebDAV; RFC 4918)", "424" = "Method Failure (WebDAV)", "425" = "Unordered Collection (Internet draft)", "426" = "Upgrade Required (RFC 2817)", "428" = "Precondition Required (RFC 6585)", "429" = "Too Many Requests (RFC 6585)", "431" = "Request Header Fields Too Large (RFC 6585)", "444" = "No Response (Nginx)", "449" = "Retry With (Microsoft)", "450" = "Blocked by Windows Parental Controls (Microsoft)", "451" = "Unavailable For Legal Reasons (Internet draft)", "499" = "Client Closed Request (Nginx)", "500" = "Internal Server Error", "501" = "Not Implemented", "502" = "Bad Gateway", "503" = "Service Unavailable", "504" = "Gateway Timeout", "505" = "HTTP Version Not Supported", "506" = "Variant Also Negotiates (RFC 2295)", "507" = "Insufficient Storage (WebDAV; RFC 4918)", "508" = "Loop Detected (WebDAV; RFC 5842)", "509" = "Bandwidth Limit Exceeded (Apache bw/limited extension)", "510" = "Not Extended (RFC 2774)", "511" = "Network Authentication Required (RFC 6585)", "598" = "Network read timeout error (Unknown)", "599" = "Network connect timeout error (Unknown)" ) rcmdcheck/R/comparison.R0000644000176200001440000000577014120376153014706 0ustar liggesusersrcmdcheck_comparison <- function(old, new) { stopifnot(is.list(old)) stopifnot(inherits(new, "rcmdcheck")) # Generate data frame of problems old_df <- do.call(rbind, lapply(old, as.data.frame, which = "old")) new_df <- as.data.frame(new, which = "new") # For each problem, determine whether it's new (1), fixed (-1), or # unchanged (0/0.5). new_df$change <- ifelse(new_df$hash %in% old_df$hash, 0, 1) old_df$change <- ifelse(old_df$hash %in% new_df$hash, 0.5, -1) cmp_df <- rbind(old_df, new_df) # Compute overall status inst_fail_new <- isTRUE(install_failed(new_df$output)) inst_fail_old <- isTRUE(install_failed(old_df$output)) if (inst_fail_new && !inst_fail_old) { ## install newly fails status <- "i-" } else if (inst_fail_new) { ## install still fails status <- "i+" } else if (new$timeout && ! any(old_df$timeout)) { ## install/check newly timeouts status <- "t-" } else if (new$timeout) { ## install/check still timeouts status <- "t+" } else if (sum(new_df$change == 1) == 0) { ## No new failures, success status <- "+" } else { ## Some new failures status <- "-" } old_versions <- vapply(old, "[[", "version", FUN.VALUE = character(1)) structure( list( package = new$package, versions = c(new$version, old_versions), status = status, old = old, new = new, cmp = cmp_df ), class = "rcmdcheck_comparison" ) } install_failed <- function(stdout) { re_inst_fail <- "can be installed \\.\\.\\.\\s*ERROR\\s*Installation failed" any(grepl(re_inst_fail, stdout)) } #' Print R CMD check result comparisons #' #' See [compare_checks()] and [compare_to_cran()]. #' #' @param x R CMD check result comparison object. #' @param header Whether to print the header. You can suppress the #' header if you want to use the printout as part of another object's #' printout. #' @param ... Additional arguments, currently ignored. #' @export print.rcmdcheck_comparison <- function(x, header = TRUE, ...) { vers <- sort(package_version(unique(x$versions))) if (header) { cat_head( "R CMD check comparison", paste0(x$package, " ", paste0(vers, collapse = " / ")) ) } status <- switch(x$status, "+" = green("OK"), "-" = red("BROKEN"), "i-" = red("INSTALL FAILURE"), "t-" = red("TIMEOUT"), "i+" = "OK (old version INSTALL FAILURE)", "t+" = "OK (old version TIMEOUT)", ) cat_line("Status: ", bold(status)) cat_line() print_comparison(x, -1, "Fixed") print_comparison(x, 0, "Still failing") print_comparison(x, 1, "Newly failing") invisible(x) } print_comparison <- function(x, change, title) { rows <- x$cmp[x$cmp$change == change, , drop = FALSE] if (nrow(rows) == 0) { return() } col <- if (change == -1) green else red sym <- if (change == -1) symbol$tick else symbol$cross cat_line(col(paste0(symbol$line, symbol$line, " ", title))) cat_line() cat_line(paste0(col(sym), " ", first_line(rows$output), "\n", collapse = "")) } rcmdcheck/R/print.R0000644000176200001440000000655714120375514013674 0ustar liggesusers #' Print R CMD check results #' @param x Check result object to print. #' @param header Whether to print a header. #' @param test_output if `TRUE`, include the test output in the results, #' if there are no test failures. If some tests fail, then only the #' failures are printed. #' @param ... Additional arguments, currently ignored. #' @export #' @importFrom cli symbol #' @importFrom prettyunits pretty_sec print.rcmdcheck <- function(x, header = TRUE, test_output = getOption("rcmdcheck.test_output", FALSE), ...) { if (header) { cat_head("R CMD check results", paste(x$package, x$version)) cat_line("Duration: ", pretty_sec(x$duration)) cat_line() } if (length(x$errors)) { lapply(x$errors, print_entry, entry_style = "err") } if (length(x$warnings)) { lapply(x$warnings, print_entry, entry_style = "warn") } if (length(x$notes)) { lapply(x$notes, print_entry, entry_style = "note") } if (install_failed(x$stdout)) { cat_head("Install failure") cat_line() cat(x$install_out) cat_line() } for (fail in names(x$test_fail)) { cat_head("Test failures", fail) cat_line() cat(x$test_fail[[fail]]) cat_line() } if (isTRUE(test_output)) { for (name in names(x$test_output)) { cat_head("Test results", name) cat_line() cat(x$test_output[[name]]) cat_line() } } print(summary(x, ...), line = FALSE) } make_line <- function(x) { x <- max(0, x) paste(rep(symbol$line, x), collapse = "") } header_line <- function(left = "", right = "", width = cli::console_width()) { ncl <- nchar(left) ncr <- nchar(right) if (ncl) left <- paste0(" ", left, " ") if (ncr) right <- paste0(" ", right, " ") ndashes <- width - ((ncl > 0) * 2 + (ncr > 0) * 2 + ncl + ncr) if (ndashes < 4) { right <- substr(right, 1, ncr - (4 - ndashes)) ncr <- nchar(right) } dashes <- make_line(ndashes) res <- paste0( substr(dashes, 1, 2), left, substr(dashes, 3, ndashes - 4), right, substr(dashes, ndashes - 3, ndashes) )[1] substring(res, 1, width) } cat_head <- function(left, right = "", style = cyan) { str <- header_line(left, right) cat_line(str, style = style) } print_entry <- function(entry, entry_style) { lines <- strsplit(entry, "\n", fixed = TRUE)[[1]] if (grepl(paste0("^(checking tests)|", "(running tests for arch)|", "(checking whether package)"), lines[1])) { lines <- c(lines[1], "See below...") } first <- paste0(symbol$pointer, " ", lines[1]) head <- do.call(style, structure(list(first), names = entry_style)) cat(head, "\n", sep = "") cat(paste0(" ", lines[-1]), sep = "\n", "") } #' @export summary.rcmdcheck <- function(object, ...) { structure(list(object), class = "rcmdcheck_summary") } print.rcmdcheck_summary <- function(x, ..., line = TRUE) { object <- x[[1]] if (line) { cat(symbol$line, symbol$line, " ", sep = "") } summary_entry(object, "errors") cat(" | ") summary_entry(object, "warnings") cat(" | ") summary_entry(object, "notes") cat("\n") } summary_entry <- function(x, name) { len <- length(x[[name]]) if (len == 0) { cat(green(paste(len, name, symbol$tick))) } else if (len == 1) { cat(red(paste(len, sub("s$", "", name), symbol$cross))) } else { cat(red(paste(len, name, symbol$cross))) } } rcmdcheck/R/xopen.R0000644000176200001440000000045213447166631013666 0ustar liggesusers #' Open the check directory in a file browser window #' #' @param target `rcmdcheck()` result. #' @inheritParams xopen::xopen #' #' @export #' @importFrom xopen xopen xopen.rcmdcheck <- function(target, app = NULL, quiet = FALSE, ...) { xopen(target$checkdir, app = app, quiet = quiet, ...) } rcmdcheck/R/utils.R0000644000176200001440000001152114122343700013655 0ustar liggesusers read_char <- function(path, encoding = "", ...) { txt <- readChar(path, nchars = file.info(path)$size, useBytes = TRUE, ...) iconv(txt, encoding, "UTF-8", sub = "byte") } win2unix <- function(str) { gsub("\r\n", "\n", str, fixed = TRUE, useBytes = TRUE) } is_string <- function(x) { is.character(x) && length(x) == 1 && !is.na(x) } is_count <- function(x) { is.numeric(x) && length(x) == 1 && !is.na(x) && round(x) == x } `%notin%` <- function(needle, haystack) { ! (needle %in% haystack) } `%||%` <- function(l, r) if (is.null(l)) r else l #' Alternative to data.frame #' #' * Sets stringsAsFactors to FALSE by default #' * If any columns have zero length, the result will have #' zero rows. #' * If a column is a scalar, then it will be recycled. #' * Non-matching number of rows gives an error, except for #' lengths zero and one. #' #' @param ... Named data frame columns, or data frames. #' @param stringsAsFactors Just leave it on `FALSE`. `:)` #' @return Data frame. #' #' @keywords internal data_frame <- function(..., stringsAsFactors = FALSE) { cols <- list(...) stopifnot(length(cols) > 0) len <- vapply(cols, NROW, 1L) maxlen <- max(len) stopifnot(all(len %in% c(0, 1, maxlen))) ## recycle, only scalars. If one empty, all empty res_len <- if (0 %in% len) 0 else maxlen cols2 <- lapply(cols, function(x) myrep(x, res_len)) names(cols2) <- names(cols) res <- do.call( data.frame, c(cols2, list(stringsAsFactors = stringsAsFactors)) ) reset_row_names(res) } #' Recycle a vector or a data frame (rows) #' #' @param x Vector or data frame to replicate. Must be length 0, 1, or #' len. #' @param len Expected length. #' #' @keywords internal myrep <- function(x, len) { stopifnot(len == 0 || NROW(x) == len || NROW(x) == 1) if (NROW(x) == len) { x } else if (is.data.frame(x)) { x[ rep(1, len), ] } else { rep(x, length.out = len) } } reset_row_names <- function(df) { rownames(df) <- NULL df } first_line <- function(x) { l <- strsplit(x, "\n", fixed = TRUE) vapply(l, "[[", "", 1) } last_char <- function(x) { l <- nchar(x) substr(x, l, l) } cat0 <- function(..., sep = "") { cat(..., sep = "") } get_install_out <- function(path, encoding = "") { install_out <- file.path(path, "00install.out") if (is_string(install_out) && file.exists(install_out)) { win2unix(read_char(install_out, encoding = encoding)) } else { "<00install.out file does not exist>" } } col_align <- function(text, width = cli::console_width(), align = c("left", "center", "right")) { align <- match.arg(align) nc <- cli::ansi_nchar(text, type = "width") if (width <= nc) { text } else if (align == "left") { paste0(text, make_space(width - nc)) } else if (align == "center") { paste0(make_space(ceiling((width - nc) / 2)), text, make_space(floor((width - nc) / 2))) } else { paste0(make_space(width - nc), text) } } strrep <- function(x, times) { x <- as.character(x) if (length(x) == 0L) return(x) r <- .mapply( function(x, times) { if (is.na(x) || is.na(times)) return(NA_character_) if (times <= 0L) return("") paste0(replicate(times, x), collapse = "") }, list(x = x, times = times), MoreArgs = list()) unlist(r, use.names = FALSE) } make_space <- function(num, filling = " ") { strrep(filling, num) } cat_line <- function(..., style = NULL) { text <- paste0(..., collapse = "") if (!is.null(style)) { text <- style(text) } cat(text, "\n", sep = "") } duration <- function(start) { as.double(Sys.time() - start, units = "secs") } as_integer <- function(x) { suppressWarnings(as.integer(x)) } YES_WORDS <- c("true", "yes", "on", "1", "yep", "yeah") NO_WORDS <- c("false", "no", "off", "0", "nope", "nah") as_flag <- function(x, default = FALSE, name = "") { x1 <- trimws(tolower(x)) if (is.na(x1)) return(default) if (x1 == "") return(default) if (x1 %in% YES_WORDS) return(TRUE) if (x1 %in% NO_WORDS) return(FALSE) warning( "Invalid ", if (nchar(name)) paste0(encodeString(name, quote = "`"), " "), "option value: ", encodeString(x, quote = "`"), ", must be TRUE or FALSE" ) default } no_timing <- function(x) { gsub("\\[[0-9]+s(/[0-9]+s)?\\] ([A-Z]+)", "\\2", x, useBytes = TRUE) } should_use_rs_pandoc <- function() { ev <- Sys.getenv("RCMDCHECK_USE_RSTUDIO_PANDOC", "") if (tolower(ev) == "true") { TRUE } else if (tolower(ev) == "false") { FALSE } else { !nzchar(Sys.which("pandoc")) && nzchar(Sys.getenv("RSTUDIO_PANDOC")) } } data_literal <- function(...) { cl <- match.call(expand.dots = FALSE) rows <- vapply(cl$..., function(x) paste(deparse(x), collapse = " "), "") utils::read.table( textConnection(rows), strip.white = TRUE, sep = "|", header = TRUE, colClasses = "character" ) } rcmdcheck/R/parse.R0000644000176200001440000001651114121400322013624 0ustar liggesusers new_rcmdcheck <- function(stdout, stderr, description, status = 0L, duration = 0L, timeout = FALSE, test_fail = NULL, session_info = NULL) { stopifnot(inherits(description, "description")) # Make sure we don't have \r on windows stdout <- win2unix(stdout) stderr <- win2unix(stderr) entries <- strsplit(paste0("\n", stdout), "\n\\*+[ ]")[[1]][-1] checkdir <- parse_checkdir(entries) notdone <- function(x) grep("^DONE", x, invert = TRUE, value = TRUE) res <- structure( list( stdout = stdout, stderr = stderr, status = status, duration = duration, timeout = timeout, rversion = parse_rversion(entries), platform = parse_platform(entries), errors = notdone(grep("ERROR\n", entries, value = TRUE)), warnings = notdone(grep("WARNING\n", entries, value = TRUE)), notes = notdone(grep("NOTE\n", entries, value = TRUE)), description = description$str(normalize = FALSE), package = description$get("Package")[[1]], version = description$get("Version")[[1]], cran = description$get_field("Repository", "") == "CRAN", bioc = description$has_fields("biocViews"), checkdir = checkdir, test_fail = test_fail %||% get_test_fail(checkdir), test_output = get_test_output(checkdir, pattern = "\\.Rout"), install_out = get_install_out(checkdir) ), class = "rcmdcheck" ) res$session_info <- get_session_info(res$package, session_info) if (isTRUE(timeout)) { res$errors <- c(res$errors, "R CMD check timed out") } res } parse_rversion <- function(entries) { line <- grep("^using R version", entries, value = TRUE) sub("^using R version ([^\\s]+)\\s.*$", "\\1", line, perl = TRUE) } parse_platform <- function(entries) { line <- grep("^using platform:", entries, value = TRUE) sub("^using platform: ([^\\s]+)\\s.*$", "\\1", line, perl = TRUE) } parse_checkdir <- function(entries) { quotes <- "\\x91\\x92\u2018\u2019`'" line <- grep("^using log directory", entries, value = TRUE) sub( paste0("^using log directory [", quotes, "]([^", quotes, "]+)[", quotes, "]$"), "\\1", line, perl = TRUE ) } get_test_fail <- function(path, encoding = "") { get_test_output(path, pattern = "\\.Rout\\.fail", encoding = encoding) } get_test_output <- function(path, pattern, encoding = "") { test_path <- file.path(path, dir(path, pattern = "^tests")) paths <- dir(test_path, paste0(pattern, "$"), full.names = TRUE) test_dirs <- basename(dirname(paths)) rel_paths <- ifelse( test_dirs == "tests", basename(paths), paste0(basename(paths), " (", sub("^tests_", "", test_dirs), ")")) names(paths) <- gsub(pattern, "", rel_paths, useBytes = TRUE) trim_header <- function(x) { first_gt <- regexpr(">", x) substr(x, first_gt, nchar(x)) } tests <- lapply(paths, read_char, encoding = encoding) tests <- lapply(tests, win2unix) lapply(tests, trim_header) } #' @export as.data.frame.rcmdcheck <- function(x, row.names = NULL, optional = FALSE, ..., which) { entries <- list( type = c( rep("error", length(x$errors)), rep("warning", length(x$warnings)), rep("note", length(x$notes)) ), output = c(x$errors, x$warnings, x$notes) ) data_frame( which = which, platform = x$platform %||% NA_character_, rversion = x$rversion %||% NA_character_, package = x$package %||% NA_character_, version = x$version %||% NA_character_, type = entries$type, output = entries$output, hash = hash_check(entries$output) ) } #' @importFrom digest digest hash_check <- function(check) { cleancheck <- gsub( "[^a-zA-Z0-9]", "", no_timing(first_line(check)), useBytes = TRUE ) vapply(cleancheck, digest, "") } #' Parse \code{R CMD check} results from a file or string #' #' At most one of \code{file} or \code{text} can be given. #' If both are \code{NULL}, then the current working directory #' is checked for a \code{00check.log} file. #' #' @param file The \code{00check.log} file, or a directory that #' contains that file. It can also be a connection object. #' @param text The contents of a \code{00check.log} file. #' @param ... Other arguments passed onto the constructor. #' Used for testing. #' @return An \code{rcmdcheck} object, the check results. #' #' @seealso \code{\link{parse_check_url}} #' @export #' @importFrom desc description parse_check <- function(file = NULL, text = NULL, ...) { ## If no text, then find the file, and read it in if (is.null(text)) { file <- find_check_file(file) text <- readLines(file, encoding = "bytes", warn = FALSE) } stdout <- paste(reencode_log(text), collapse = "\n") # Simulate minimal description from info in log entries <- strsplit(paste0("\n", stdout), "\n* ", fixed = TRUE)[[1]][-1] desc <- desc::description$new("!new") desc$set( Package = parse_package(entries), Version = parse_version(entries) ) new_rcmdcheck( stdout = stdout, stderr = "", description = desc, ... ) } validEnc <- function(x) { ## We just don't do this on older R, because the functionality is ## not available if (getRversion() >= "3.3.0") { asNamespace("base")$validEnc(x) } else { rep(TRUE, length(x)) } } reencode_log <- function(log) { csline <- head(grep("^\\* using session charset: ", log, perl = TRUE, useBytes = TRUE, value = TRUE), 1) if (length(csline)) { cs <- strsplit(csline, ": ")[[1]][2] log <- iconv(log, cs, "UTF-8", sub = "byte") if (any(bad <- !validEnc(log))) { log[bad] <- iconv(log[bad], to = "ASCII", sub = "byte") } } else { log <- iconv(log, to = "ASCII", sub = "byte") } log } parse_package <- function(entries) { line <- grep("^this is package .* version", entries, value = TRUE) sub( "^this is package .([a-zA-Z0-9\\.]+)[^a-zA-Z0-9\\.].*$", "\\1", line, perl = TRUE ) } parse_version <- function(entries) { line <- grep("^this is package .* version", entries, value = TRUE) sub( "^this is package .[a-zA-Z0-9\\.]+. version .([-0-9\\.]+)[^-0-9\\.].*$", "\\1", line, perl = TRUE ) } #' Shorthand to parse R CMD check results from a URL #' #' @param url URL to parse the results from. Note that it should #' not contain HTML markup, just the text output. #' @param quiet Passed to \code{download.file}. #' @return An \code{rcmdcheck} object, the check results. #' #' @seealso \code{\link{parse_check}} #' @export parse_check_url <- function(url, quiet = FALSE) { parse_check(text = download_file_lines(url, quiet = quiet)) } find_check_file <- function(file) { if (is.null(file)) file <- "." if (file.exists(file) && file.info(file)$isdir) { find_check_file_indir(file) } else if (file.exists(file)) { file } else { stop("Cannot find R CMD check output file") } } find_check_file_indir <- function(dir) { if (file.exists(logfile <- file.path(dir, "00check.log"))) { logfile } else { stop("Cannot find R CMD check output file") } } rcmdcheck/R/styles.R0000644000176200001440000000301014120347676014050 0ustar liggesusers rcmdcheck_color <- function(f) { function(...) { num_cols <- as_integer(getOption( "rcmdcheck.num_colors", Sys.getenv("RCMDCHECK_NUM_COLORS", "NA") )) if (! is.na(num_cols)) { withr::local_options(c(cli.num_colors = num_cols)) } f(...) } } the <- new.env(parent = emptyenv()) style <- function(..., sep = "") { args <- list(...) st <- names(args) the$styles <- the$styles %||% list( "ok" = rcmdcheck_color(cli::col_green), "note" = rcmdcheck_color(cli::col_blue), "warn" = rcmdcheck_color(cli::col_magenta), "err" = rcmdcheck_color(cli::col_red), "pale" = rcmdcheck_color(cli::col_grey), "timing" = rcmdcheck_color(cli::col_cyan) ) nms <- names(args) x <- lapply(seq_along(args), function(i) { if (nzchar(nms[i])) the$styles[[nms[i]]](args[[i]]) else args[[i]] }) paste(unlist(x), collapse = sep) } red <- NULL green <- NULL yellow <- NULL bold <- NULL underline <- NULL bgRed <- NULL white <- NULL cyan <- NULL darkgrey <- NULL .onLoad <- function(libname, pkgname) { red <<- rcmdcheck_color(cli::col_red) green <<- rcmdcheck_color(cli::col_green) yellow <<- rcmdcheck_color(cli::col_yellow) bold <<- rcmdcheck_color(cli::style_bold) underline <<- rcmdcheck_color(cli::style_underline) bgRed <<- rcmdcheck_color(cli::bg_red) white <<- rcmdcheck_color(cli::col_white) cyan <<- rcmdcheck_color(cli::col_cyan) darkgrey <<- rcmdcheck_color(cli::col_grey) } rcmdcheck/R/error.R0000644000176200001440000000070514120347676013666 0ustar liggesusers report_system_error <- function(msg, status) { if (status$status == 0) return() if (status$stderr == "") { stop( msg, ", unknown error, standard output:\n", yellow(status$stdout), call. = FALSE ) } else { stop( underline(yellow(paste0("\n", msg, ", standard output:\n\n"))), yellow(status$stdout), "\n", underline(red("Standard error:\n\n")), red(status$stderr), call. = FALSE ) } } rcmdcheck/R/options.R0000644000176200001440000001023214122343700014206 0ustar liggesusers #' rcmdcheck configuration #' #' Options take precedence over environment variables. E.g. if both #' the `RCMDCHECK_NUM_COLORS` environment variables and the #' `rcmdcheck.num_colors` option are set, then the latter is used. #' #' rcmdcheck uses the cli package for much of its output, so you can #' configure the output via cli, see [cli::cli-config]. #' #' Package configration is defined in the `DESCRIPTION` file of the checked #' package. E.g.: #' ``` #' Config/build/clean-inst-doc: FALSE #' ``` #' #' # Environment variables #' #' * `R_PROFILE_USER`: standard R environment variable to configure the #' path to the user level R profile. See [base::R_PROFILE_USER]. #' #' * `RCMDCHECK_BASE_URL`: URL to the root of the CRAN check web page. #' You can use this to select an alternative CRAN mirror. Defaults to #' `https://cran.r-project.org/web/checks/`. #' #' * `RCMDCHECK_DETAILS_URL`: URL to the root of the CRAN check output #' page. Defaults to `https://www.r-project.org/nosvn/R.check/`. #' #' * `RCMDCHECK_ERROR_ON`: the default value for the `error_on` argument #' of [rcmdcheck()]. #' #' * `RCMDCHECK_FLAVOURS_URL` URL to the CRAN check flavours page. #' You can use this to select an alternative CRAN mirror. Defaults to #' `https://cran.r-project.org/web/checks/check_flavors.html`. #' #' * `RCMDCHECK_NUM_COLORS`: the number of ANSI colors to use in the output. #' It can be used to override the number of colors detected or configured #' by the cli package. See [cli::num_ansi_colors()]. This configuration #' is only used for the output of rcmdcheck and it does not affect the #' examples and test cases (and other code) of the checked package. #' It not set, then the default of cli is uesed. The corresponding #' option is `rcmdcheck.num_colors`. #' #' * `RCMDCHECK_TIMESTAMP_LIMIT`: lower limit is seconds, above which #' rcmdcheck adds time stamps to the individual check steps. It may be #' fractional. Defaults to 1/3 of a second. The corresponding option is #' `rcmdcheck.timestamp_limit`. #' #' * `RCMDCHECK_USE_RSTUDIO_PANDOC`: Flag (`true` or `false`). If `true`, #' then rcmdcheck _always_ puts RStudio's pandoc (if available) on the #' path. If `false`, then it _never_ does that. If not set, or set to a #' different value, then pandoc is put on the path only if it is not #' already available. RStudio's pandoc is detected via an `RSTUDIO_PANDOC` #' environment variable. #' #' * `RCMDCHECK_LOAD_CHECK_ENV`: you can use this environment variable #' suppress loading environment variables from the `tools/check.env` file. #' See [rcmdcheck()] for details. #' #' * `RSTUDIO_PANDOC`: if set, rcmdcheck adds this environment variable #' to the PATH if pandoc is not on the PATH already. It is usually set #' in RStudio. See also the `RCMDCHECK_USE_RSTUDIO_PANDOC` environment #' variable. #' #' # Options #' #' * `rcmdcheck.num_colors`: the number of ANSI colors to use in the output. #' It can be used to override the number of colors detected or configured #' by the cli package. See [cli::num_ansi_colors()]. This configuration #' is only used for the output of rcmdcheck and it does not affect the #' examples and test cases (and other code) of the checked package. #' It not set, then the default of cli is uesed. The corresponding #' environment variable is `RCMDCHECK_NUM_COLORS`. #' #' * `rcmdcheck.test_output`: Flag (`TRUE` or `FALSE`), whether #' [print.rcmdcheck()] should print the full test output if there are #' no test failures. If some tests fail, then only the failures are #' printed, independently of this option. #' #' * `rcmdcheck.timestamp_limit`: lower limit is seconds, above which #' rcmdcheck adds time stamps to the individual check steps. It may be #' fractional. Defaults to 1/3 of a second. The corresponding environment #' variable is `RCMDCHECK_TIMESTAMP_LIMIT`. #' #' # Package configuration: #' #' * `Config/build/clean-inst-doc`: Flag (`TRUE` or `FALSE`) to #' specify if the `inst/doc` directory should be cleaned up when #' building a package directory. If not specified, then `NULL` is used. #' See the `clean_doc` option of [pkgbuild::build()] for more details. #' #' @name rcmdcheck-config NULL rcmdcheck/R/comparison-summary.R0000644000176200001440000000220214120376334016365 0ustar liggesusers #' @export summary.rcmdcheck_comparison <- function(object, ...) { structure(list(object), class = "rcmdcheck_comparison_summary") } #' @export print.rcmdcheck_comparison_summary <- function(x, ...) { object <- x[[1]] sum_status <- switch(object$status, "t-" = white(bgRed("T")), "t+" = "T", "i-" = white(bgRed("I")), "i+" = "I", "+" = green(symbol$tick), "-" = red(symbol$cross) ) vers <- paste( sort(package_version(unique(object$versions))), collapse = " / " ) header <- paste0(sum_status, " ", object$package, " ", vers) cat_line( col_align(header, width = 40), " ", symbol$line, symbol$line, " ", change_summary(object$cmp, "error"), " | ", change_summary(object$cmp, "warning"), " | ", change_summary(object$cmp, "note"), style = darkgrey ) invisible(x) } change_summary <- function(rows, type) { rows <- rows[rows$type == type, , drop = FALSE] n <- function(change) sum(rows$change == change) paste0( toupper(substr(type, 1, 1)), ": ", n(0), if (n(-1)) green(paste0("-", n(-1))) else " ", if (n(1)) red(paste0("+", n(1))) else " " ) } rcmdcheck/R/auto_clean.R0000644000176200001440000000031613142422611014627 0ustar liggesusersauto_clean <- function(paths) { force(paths) env <- new.env(parent = emptyenv()) reg.finalizer(env, onexit = TRUE, function(e) { try(unlink(paths, recursive = TRUE), silent = TRUE) }) env } rcmdcheck/R/background.R0000644000176200001440000001326614123052257014651 0ustar liggesusers #' Run an `R CMD check` process in the background #' #' rcmdcheck_process is an R6 class, that extends the #' [callr::rcmd_process] class (which in turn extends [processx::process]. #' #' @section Usage: #' ``` #' cp <- rcmdcheck_process$new(path = ".", args = character(), #' build_args = character(), check_dir = NULL, #' libpath = .libPaths(), repos = getOption("repos")) #' #' cp$parse_results() #' ``` #' #' Other methods are inherited from [callr::rcmd_process] and #' [processx::process]. #' #' Note that you calling the `get_output_connection` and #' `get_error_connection` method on this is not a good idea, because #' then the stdout and/or stderr of the process will not be collected #' for `parse_results()`. #' #' You can still use the `read_output_lines()` and `read_error_lines()` #' methods to read the standard output and error, `parse_results()` is #' not affected by that. #' #' @section Arguments: #' * `cp`: A new rcmdcheck_process object. #' * `path`: Path to a package tree or a package archive file. This is the #' package to check. #' * `args`: Command line arguments to `R CMD check`. #' * `build_args`: Command line arguments to `R CMD build`. #' * `check_dir`: Directory for the results. #' * `libpath`: The library path to set for the check. #' * `repos`: The `repos` option to set for the check. #' This is needed for cyclic dependency checks if you use the #' `--as-cran` argument. The default uses the current value. #' * `env`: A named character vector, extra environment variables to #' set in the check process. #' #' @section Details: #' Most methods are inherited from [callr::rcmd_process] and #' [processx::process]. #' #' `cp$parse_results()` parses the results, and returns an S3 object with #' fields `errors`, `warnnigs` and `notes`, just like [rcmdcheck()]. It #' is an error to call it before the process has finished. Use the #' `wait()` method to wait for the check to finish, or the `is_alive()` #' method to check if it is still running. #' #' @importFrom R6 R6Class #' @name rcmdcheck_process NULL #' @export rcmdcheck_process <- R6Class( "rcmdcheck_process", inherit = callr::rcmd_process, public = list( initialize = function(path = ".", args = character(), build_args = character(), check_dir = NULL, libpath = .libPaths(), repos = getOption("repos"), env = character()) rcc_init(self, private, super, path, args, build_args, check_dir, libpath, repos, env), parse_results = function() rcc_parse_results(self, private), read_output_lines = function(...) { l <- super$read_output_lines(...) private$cstdout <- c(private$cstdout, paste0(l, "\n")) l }, read_output = function(...) { l <- super$read_output(...) private$cstdout <- c(private$cstdout, l) l }, kill = function(...) { private$killed <- TRUE super$kill(...) } ), private = list( path = NULL, check_dir = NULL, targz = NULL, description = NULL, cstdout = character(), cstderr = character(), killed = FALSE, session_output = NULL, tempfiles = character() ) ) #' @importFrom callr rcmd_process rcmd_process_options #' @importFrom desc desc rcc_init <- function(self, private, super, path, args, build_args, check_dir, libpath, repos, env) { if (file.info(path)$isdir) { path <- find_package_root_file(path = path) } else { path <- normalizePath(path) } if (is.null(check_dir)) { check_dir <- tempfile() cleanup <- TRUE } else { cleanup <- FALSE } # Add pandoc to the PATH for R CMD build. # The updated PATH is also inherited in the subprocess below. if (should_use_rs_pandoc()) local_path(Sys.getenv("RSTUDIO_PANDOC")) pkgbuild::without_cache(pkgbuild::local_build_tools()) targz <- build_package(path, check_dir, build_args = build_args, libpath = libpath, quiet = TRUE) private$description <- desc(path) private$path <- path private$check_dir <- check_dir private$targz <- targz set_env(path, targz, private$description) # set up environment, start with callr safe set chkenv <- callr::rcmd_safe_env() package <- private$description$get("Package")[[1]] libdir <- file.path(dirname(targz), paste0(package, ".Rcheck")) # if R_TESTS is set here, we'll skip the session_info, because we are # probably inside test cases of some package if (Sys.getenv("R_TESTS", "") == "") { private$session_output <- tempfile() private$tempfiles <- c(private$session_output, profile) profile <- make_fake_profile(package, private$session_output, libdir) chkenv["R_TESTS"] <- profile } # user supplied env vars take precedence if (length(env)) chkenv[names(env)] <- env options <- rcmd_process_options( cmd = "check", cmdargs = c(basename(targz), args), libpath = c(libdir, libpath), repos = repos, user_profile = FALSE, stderr = "2>&1", env = chkenv ) with_dir( dirname(targz), super$initialize(options) ) invisible(self) } rcc_parse_results <- function(self, private) { if (self$is_alive()) stop("Process still alive") ## Make sure all output is read out if (self$has_output_connection()) self$read_output_lines() if (self$has_error_connection()) self$read_error_lines() on.exit(unlink(private$tempfiles, recursive = TRUE), add = TRUE) new_rcmdcheck( stdout = paste(win2unix(private$cstdout), collapse = ""), stderr = paste(win2unix(private$cstderr), collapse = ""), description = private$description, status = self$get_exit_status(), duration = duration(self$get_start_time()), timeout = private$killed, session_info = private$session_output ) } rcmdcheck/R/cran.R0000644000176200001440000000453414120347676013464 0ustar liggesusers #' Download and show all CRAN check flavour platforms #' #' If the `package` argument is `NULL`, then all current #' platforms are downloaded. If the `package` argument is specified, #' then all flavours used for the latest package checks for that #' package, are downloaded and returned. #' #' @param package CRAN package name or `NULL`. #' @return Character vector of platform ids. #' #' @export #' @examples #' \dontrun{ #' cran_check_flavours() #' cran_check_flavours("simplegraph") #' } cran_check_flavours <- function(package = NULL) { if (is.null(package)) return(cran_check_flavours_generic()) base <- Sys.getenv( "RCMDCHECK_BASE_URL", "https://cran.r-project.org/web/checks/" ) url <- paste0(base, "check_results_", package, ".html") html <- download_file_lines(url) fl_rows <- grep( " \\s*([^\\s<]+)\\s*.*$", "\\1", fl_rows, perl = TRUE ) } cran_check_flavours_generic <- function() { url <- Sys.getenv( "RCMDCHECK_FLAVOURS_URL", "https://cran.r-project.org/web/checks/check_flavors.html" ) html <- download_file_lines(url) fl_rows <- grep( "^ ", html, value = TRUE ) sub( "^ \\s*([^\\s<]+)\\s*.*$", "\\1", fl_rows, perl = TRUE ) } #' Download and parse R CMD check results from CRAN #' #' @param package Name of a single package to download the checks for. #' @param flavours CRAN check flavours to use. Defaults to all #' flavours that were used to check the package. #' @param quiet Whether to omit the download progress bars. #' @return A list of `rcmdcheck` objects. #' #' @export cran_check_results <- function(package, flavours = cran_check_flavours(package), quiet = FALSE) { stopifnot(is_string(package)) base <- Sys.getenv( "RCMDCHECK_DETAILS_URL", "https://www.r-project.org/nosvn/R.check/" ) urls <- paste0(base, flavours, "/", package, "-00check.txt") tmp <- paste0(tempfile(), "-", seq_along(urls)) download_files(urls, tmp, quiet = FALSE) structure( lapply(tmp, parse_check), names = flavours, package = package, class = "rmcdcheck_cran_results" ) } rcmdcheck/R/build.R0000644000176200001440000000352214120347676013634 0ustar liggesusers #' @importFrom pkgbuild pkgbuild_process #' @importFrom withr with_envvar build_package <- function(path, tmpdir, build_args, libpath, quiet) { path <- normalizePath(path) check_for_tilde_file(path) dir.create(tmpdir, recursive = TRUE, showWarnings = FALSE) tmpdir <- normalizePath(tmpdir) if (file.info(path)$isdir) { if (!quiet) cat_head("R CMD build") desc <- desc(path) clean_doc <- as_flag(desc$get("Config/build/clean-inst-doc"), NULL) with_envvar( c("R_LIBS_USER" = paste(libpath, collapse = .Platform$path.sep)), { proc <- pkgbuild_process$new( path, tmpdir, args = build_args, clean_doc = clean_doc, manual = TRUE ) on.exit(proc$kill(), add = TRUE) callback <- detect_callback() while (proc$is_incomplete_output() || proc$is_incomplete_error() || proc$is_alive()) { proc$poll_io(-1) out <- proc$read_output() err <- proc$read_error() if (!quiet) { out <- sub("(checking for file .)/.*DESCRIPTION(.)", "\\1.../DESCRIPTION\\2", out, perl = TRUE) callback(out) callback(err) } } proc$get_built_file() } ) } else { dest <- file.path(tmpdir, basename(path)) if (!file.exists(dest) || normalizePath(dest) != path) { file.copy(path, dest, overwrite = TRUE) } dest } } check_for_tilde_file <- function(path) { lst <- dir(path) if ("~" %in% lst) { stop( "This package contains a file or directory named `~`. ", "Because of a bug in older R versions (before R 4.0.0), ", "building this package might delete your entire home directory!", "It is best to (carefully!) remove the file. rcmdcehck will exit now." ) } } rcmdcheck/R/callback.R0000644000176200001440000001527314122355251014265 0ustar liggesusers ## This is the callback called for each line of the output ## We color it a bit, OK is green, NOTE is blue ## WARNING is magenta, ERROR is red. #' @importFrom cli symbol #' @importFrom utils head tail #' @importFrom prettyunits pretty_dt block_callback <- function( top_line = TRUE, sys_time = NULL, as_cran = NA) { sys_time <- sys_time %||% Sys.time partial_line <- "" state <- "OK" test_running <- FALSE should_time <- FALSE line_started <- sys_time() now <- NULL prev_line <- "" no <- function(x, what = "") { pattern <- paste0(" \\.\\.\\.[ ]?", what, "$") sub("^\\*+ ", "", sub(pattern, "", x)) } time_if_long <- function() { limit <- as.numeric(getOption( "rcmdcheck.timestamp_limit", Sys.getenv("RCMDCHECK_TIMESTAMP_LIMIT", "0.33333") )) elapsed <- now - line_started line_started <<- now if (elapsed > as.difftime(limit, units = "secs")) { style(timing = paste0(" (", pretty_dt(elapsed), ")")) } else { "" } } do_line <- function(x) { should_time <<- FALSE now <<- sys_time() ## Test mode is special. It will change the 'state' back to 'OK', ## once it is done. xx <- if (state == "tests") { do_test_mode(x) } else if (is_new_check(x)) { do_new_check(x) } else if (grepl("^Status: ", x)) { ## We just skip the status, it is printed out anyway, as the return ## value NA_character_ } else { do_continuation(x) } prev_line <<- x ## NA_character_ can omit output if (is.na(xx)) return() if (should_time) xx <- style(xx, timing = time_if_long()) line_started <<- now cat(xx, "\n", sep = "") flush(stdout()) } do_new_check <- function(x) { should_time <<- TRUE if (grepl(" \\.\\.\\. OK\\s*$", x)) { state <<- "OK" style(ok = symbol$tick, " ", pale = no(x, "OK")) } else if (grepl(" \\.\\.\\. NOTE\\s*$", x)) { state <<- "NOTE" style(note = c("N ", no(x, "NOTE"))) } else if (grepl(" \\.\\.\\. WARNING\\s*$", x)) { state <<- "WARNING" style(warn = c("W ", no(x, "WARNING"))) } else if (grepl(" \\.\\.\\.\\s*(\\[[0-9ms]+\\])?\\s*ERROR\\s*$", x)) { state <<- "ERROR" style(err = c("E ", no(x, "ERROR"))) } else if (grepl("^\\* checking tests \\.\\.\\.[ ]?$", x)) { state <<- "tests" style(pale = c(symbol$line, " ", no(x))) } else if (grepl("^\\*\\* running tests", x)) { state <<- "tests" test_running <<- FALSE style(pale = c(symbol$line, symbol$line, " ", no(x), " ")) } else if (grepl("^\\* DONE\\s*$", x)) { state <<- "OK" NA_character_ } else { style(pale = c(symbol$line, " ", no(x))) } } do_test_mode <- function(x) { ## Maybe we just learned the result of the current test file if (test_running) { if (grepl("^\\s+OK", x)) { ## Tests are over, success state <<- "OK" test_running <<- FALSE xx <- style(ok = symbol$tick, pale = no(prev_line)) xx <- style(xx, timing = time_if_long()) } else if (grepl("^\\s+ERROR", x)) { ## Tests are over, error state <<- "ERROR" test_running <<- FALSE if (isTRUE(as_cran)) { xp <- style(pale = symbol$line, pale = no(prev_line)) xp <- style(xp, timing = time_if_long()) cat(xp, "\n", sep = "") xx <- style(err = "E", pale = " Some test files failed") } else { xx <- style(err = "E", pale = no(prev_line)) } xx <- style(xx, timing = time_if_long()) } else if (grepl("^\\s+Comparing", x)) { ## Comparison test_running <<- FALSE xx <- style(ok = symbol$tick, pale = no(prev_line)) xx <- style(xx, timing = time_if_long()) } else if (grepl("^\\s+Running", x)) { ## Next test is running now, state unchanged if (isTRUE(as_cran)) { xx <- style(pale = symbol$line, pale = no(prev_line)) } else { xx <- style(ok = symbol$tick, pale = no(prev_line)) } xx <- style(xx, timing = time_if_long()) now <<- sys_time() } else { ## Should not happen? xx <- NA_character_ } if (!is.na(xx)) { cat(xx, "\n", sep = "") flush(stdout()) } } ## Now focus on the current line, if we are still testing if (state != "tests") return(NA_character_) if (grepl("^\\s+Comparing.*OK$", x)) { ## Comparison, success style(ok = symbol$tick, pale = no(x, "OK")) } else if (grepl("^\\s+Comparing", x)) { ## Comparison, failed tr <- sub("^.*\\.\\.\\.(.*)$", "\\1", x, perl = TRUE) xx <- style(pale = c("X", no(x, ".*"))) cat(xx, "\n", sep = "") paste0(" ", tr) } else if (grepl("^\\s+Running", x)) { now <<- sys_time() test_running <<- TRUE NA_character_ } else if (grepl("^\\s+OK", x)) { state <<- "OK" test_running <<- FALSE NA_character_ } else if (grepl("^\\s(\\[[0-9/ms]+\\]+)?\\s*ERROR", x)) { state <<- "ERROR" test_running <<- FALSE NA_character_ } else if (grepl("^\\*\\* running tests", x)) { test_running <<- FALSE style(pale = c(symbol$line, symbol$line, " ", no(x), " ")) } else { paste0(" ", x) } } do_test_partial_line <- function(x) { if (test_running) { if (grepl("^\\s+Running ", x) || grepl("^\\s+Comparing", x)) { test_running <<- FALSE if (grepl("^\\s+Running ", x)) { if (isTRUE(as_cran)) { xx <- style(pale = symbol$line, pale = no(prev_line)) } else { xx <- style(ok = symbol$tick, pale = no(prev_line)) } xx <- style(xx, timing = time_if_long()) } else { xx <- style(ok = symbol$tick, pale = prev_line) } cat(xx, "\n", sep = "") flush(stdout()) } } } do_continuation <- function(x) { paste0(" ", x) } function(x) { x <- paste0(partial_line, x) partial_line <<- "" lines <- strsplit(x, "\r?\n")[[1]] if (last_char(x) != "\n") { partial_line <<- tail(lines, 1) lines <- head(lines, -1) } cat(" \r") lapply(lines, do_line) if (state == "tests") do_test_partial_line(partial_line) cat0(sub("^[\\* ]\\*?", " ", partial_line), "\r") } } is_new_check <- function(x) { grepl("^\\*\\*? ", x) } simple_callback <- function(top_line = TRUE, sys_time = NULL, ...) { function(x) cat(gsub("[\r\n]+", "\n", x, useBytes = TRUE)) } #' @importFrom cli is_dynamic_tty detect_callback <- function(...) { if (cli::is_dynamic_tty()) block_callback(...) else simple_callback(...) } should_add_spinner <- function() { is_dynamic_tty() } rcmdcheck/R/package.R0000644000176200001440000002252514123052257014123 0ustar liggesusers #' Run R CMD check from R and Capture Results #' #' Run R CMD check from R programmatically, and capture the results of the #' individual checks. #' #' @docType package #' @name rcmdcheck NULL #' Run `R CMD check` on a package or a directory #' #' Runs `R CMD check` as an external command, and parses its output and #' returns the check failures. #' #' See [rcmdcheck_process] if you need to run `R CMD check` in a background #' process. #' #' # Turning off package checks #' #' Sometimes it is useful to programmatically turn off some checks that #' may report check NOTEs. #' rcmdcehck provides two ways to do this. #' #' First, you may declare in `DESCRIPTION` that you don't want to see #' NOTEs that are accepted on CRAN, with this entry: #' #' ``` #' Config/rcmdcheck/ignore-inconsequential-notes: true #' ``` #' #' Currently, this will make rcmdcheck ignore the following notes: #' `r format_env_docs()`. #' #' The second way is more flexible, and lets you turn off individual checks #' via setting environment variables. #' You may provide a `tools/check.env` _environment file_ in your package #' with the list of environment variable settings that rcmdcheck will #' automatically use when checking the package. #' See [Startup] for the format of this file. #' #' Here is an example `tools/check.env` file: #' ``` #' # Report if package size is larger than 10 megabytes #' _R_CHECK_PKG_SIZES_THRESHOLD_=10 #' #' # Do not check Rd cross references #' _R_CHECK_RD_XREFS_=false #' #' # Do not report if package requires GNU make #' _R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_=false #' #' # Do not check non-ASCII strings in datasets #' _R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_=true #' ``` #' #' See the ["R internals" manual](https://cran.r-project.org/doc/manuals/r-devel/R-ints.html) #' and the [R source code](https://github.com/wch/r-source) for the #' environment variables that control the checks. #' #' Note that `Config/rcmdcheck/ignore-inconsequential-notes` and the #' `check.env` file are only supported by rcmdcheck, and running #' `R CMD check` from a shell (or GUI) will not use them. #' #' @param path Path to a package tarball or a directory. #' @param quiet Whether to print check output during checking. #' @param args Character vector of arguments to pass to `R CMD check`. Pass each #' argument as a single element of this character vector (do not use spaces to #' delimit arguments like you would in the shell). For example, to skip #' running of examples and tests, use `args = c("--no-examples", #' "--no-tests")` and not `args = "--no-examples --no-tests"`. (Note that #' instead of the `--output` option you should use the `check_dir` argument, #' because `--output` cannot deal with spaces and other special characters on #' Windows.) #' @param build_args Character vector of arguments to pass to `R CMD build`. #' Pass each argument as a single element of this character vector (do not use #' spaces to delimit arguments like you would in the shell). For example, #' `build_args = c("--force", "--keep-empty-dirs")` is a correct usage and #' `build_args = "--force --keep-empty-dirs"` is incorrect. #' @param check_dir Path to a directory where the check is performed. #' If this is not `NULL`, then the a temporary directory is used, that #' is cleaned up when the returned object is garbage collected. #' @param libpath The library path to set for the check. #' The default uses the current library path. #' @param repos The `repos` option to set for the check. #' This is needed for cyclic dependency checks if you use the #' `--as-cran` argument. The default uses the current value. #' @param timeout Timeout for the check, in seconds, or as a #' [base::difftime] object. If it is not finished before this, it will be #' killed. `Inf` means no timeout. If the check is timed out, #' that is added as an extra error to the result object. #' @param error_on Whether to throw an error on `R CMD check` failures. #' Note that the check is always completed (unless a timeout happens), #' and the error is only thrown after completion. If `"never"`, then #' no errors are thrown. If `"error"`, then only `ERROR` failures #' generate errors. If `"warning"`, then `WARNING` failures generate #' errors as well. If `"note"`, then any check failure generated an #' error. Its default can be modified with the `RCMDCHECK_ERROR_ON` #' environment variable. If that is not set, then `"never"` is used. #' @param env A named character vector, extra environment variables to #' set in the check process. #' @return An S3 object (list) with fields `errors`, #' `warnings` and `notes`. These are all character #' vectors containing the output for the failed check. #' #' @export #' @importFrom rprojroot find_package_root_file #' @importFrom withr local_path with_dir #' @importFrom callr rcmd_safe #' @importFrom desc desc rcmdcheck <- function( path = ".", quiet = FALSE, args = character(), build_args = character(), check_dir = NULL, libpath = .libPaths(), repos = getOption("repos"), timeout = Inf, error_on = Sys.getenv( "RCMDCHECK_ERROR_ON", c("never", "error", "warning", "note")[1] ), env = character()) { error_on <- match.arg(error_on, c("never", "error", "warning", "note")) if (file.info(path)$isdir) { path <- find_package_root_file(path = path) } else { path <- normalizePath(path) } if (is.null(check_dir)) { check_dir <- tempfile() cleanup <- TRUE } else { cleanup <- FALSE } # Add pandoc to the PATH, for R CMD build and R CMD check if (should_use_rs_pandoc()) local_path(Sys.getenv("RSTUDIO_PANDOC")) pkgbuild::without_cache(pkgbuild::local_build_tools()) targz <- build_package(path, check_dir, build_args = build_args, libpath = libpath, quiet = quiet) start_time <- Sys.time() desc <- desc(targz) set_env(path, targz, desc) out <- with_dir( dirname(targz), do_check(targz, package = desc$get("Package")[[1]], args = args, libpath = libpath, repos = repos, quiet = quiet, timeout = timeout, env = env ) ) on.exit(unlink(out$session_info, recursive = TRUE), add = TRUE) if (isTRUE(out$timeout)) message("R CMD check timed out") res <- new_rcmdcheck( stdout = out$result$stdout, stderr = out$result$stderr, description = desc, status = out$result$status, duration = duration(start_time), timeout = out$result$timeout, session_info = out$session_info ) # Automatically delete temporary files when this object disappears if (cleanup) res$cleaner <- auto_clean(check_dir) handle_error_on(res, error_on) res } #' @importFrom withr with_envvar do_check <- function(targz, package, args, libpath, repos, quiet, timeout, env) { # if the pkg.Rcheck directory already exists, unlink it unlink(paste0(package, ".Rcheck"), recursive = TRUE) # set up environment, start with callr safe set chkenv <- callr::rcmd_safe_env() libdir <- file.path(dirname(targz), paste0(package, ".Rcheck")) # if R_TESTS is set here, we'll skip the session_info, because we are # probably inside test cases of some package if (Sys.getenv("R_TESTS", "") == "") { session_output <- tempfile() profile <- make_fake_profile(package, session_output, libdir) on.exit(unlink(profile), add = TRUE) chkenv["R_TESTS"] <- profile } else { session_output <- NULL } # user supplied env vars take precedence if (length(env)) chkenv[names(env)] <- env if (!quiet) cat_head("R CMD check") callback <- if (!quiet) detect_callback(as_cran = "--as-cran" %in% args) res <- rcmd_safe( "check", cmdargs = c(basename(targz), args), libpath = c(libdir, libpath), user_profile = FALSE, repos = repos, stderr = "2>&1", block_callback = callback, spinner = !quiet && should_add_spinner(), timeout = timeout, fail_on_status = FALSE, env = chkenv ) # To print an incomplete line on timeout or crash if (!is.null(callback) && (res$timeout || res$status != 0)) callback("\n") # Non-zero status is an error, the check process failed # R CMD check returns 1 for installation errors, we don't want to error # for those. if (res$status != 0 && res$status != 1) { stop( call. = FALSE, "R CMD check process failed with exit status ", res$status, "\n\nStandard output and error:\n", res$stdout ) } list(result = res, session_info = session_output) } handle_error_on <- function(res, error_on) { level <- c(never = 0, error = 1, warning = 2, note = 3)[error_on] if (isTRUE(res$timeout)) { print(res) stop(make_error(res, "R CMD check timed out")) } else if (length(res$errors) && level >= 1) { print(res) stop(make_error(res, "R CMD check found ERRORs")) } else if (length(res$warnings) && level >= 2) { print(res) stop(make_error(res, "R CMD check found WARNINGs")) } else if (length(res$notes) && level >= 3) { print(res) stop(make_error(res, "R CMD check found NOTEs")) } } make_error <- function(res, msg) { structure( list(result = res, message = msg, call = NULL), class = c( if (isTRUE(res$timeout)) "rcmdcheck_timeout", if (length(res$errors)) "rcmdcheck_error", if (length(res$warnings)) "rcmdcheck_warning", if (length(res$notes)) "rcmdcheck_note", "rcmdcheck_failure", "error", "condition" ) ) } rcmdcheck/R/env.R0000644000176200001440000000671414122343700013315 0ustar liggesusers set_env <- function(path, targz, desc, envir = parent.frame()) { pkg <- desc$get("Package") ign <- as_flag(desc$get("Config/rcmdcheck/ignore-inconsequential-notes")) if (ign) ignore_env(envir = envir) load_env(path, targz, pkg, envir = envir) } ignore_env_config <- function() { data_literal( "docs" | "envvar" | "value", # --------------------------------------------------------------------- "report large package sizes" | "_R_CHECK_PKG_SIZES_" | FALSE, "check cross-references in Rd files" | "_R_CHECK_RD_XREFS_" | FALSE, "NOTE if package requires GNU make" | "_R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_" | FALSE, "report marked non-ASCII strings in datasets" | "_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_" | TRUE ) } format_env_docs <- function() { envs <- ignore_env_config() paste0( "* ", envs$docs, " (`", envs$envvar, " = ", envs$value, "`)", collapse = ",\n" ) } ignore_env <- function(to_ignore = NULL, envir = parent.frame()) { if (is.null(to_ignore)) { conf <- ignore_env_config() to_ignore <- structure(conf$value, names = conf$envvar) } withr::local_envvar(to_ignore, .local_envir = envir) } load_env <- function(path, targz, package, envir = parent.frame()) { should_load <- as_flag(Sys.getenv("RCMDCHECK_LOAD_CHECK_ENV"), TRUE) if (!should_load) return() env <- NULL if (file.info(path)$isdir) { env_path <- file.path(path, "tools", "check.env") } else { dir.create(tmp <- tempfile()) on.exit(unlink(tmp, recursive = TRUE), add = TRUE) utils::untar( targz, file.path(package, "tools", "check.env"), exdir = tmp, tar = "internal" ) env_path <- file.path(tmp, package, "tools", "check.env") } if (file.exists(env_path)) { load_env_file(env_path, envir = envir) } } load_env_file <- function(path, envir = parent.frame()) { env <- readLines(path, warn = FALSE) env <- ignore_comments(env) env <- ignore_empty_lines(env) if (length(env) == 0) return(invisible()) env <- lapply(env, parse_dot_line) envc <- structure( vapply(env, "[[", character(1), "value"), names = vapply(env, "[[", character(1), "key") ) withr::local_envvar(envc, .local_envir = envir) } ignore_comments <- function(lines) { grep("^#", lines, invert = TRUE, value = TRUE) } ignore_empty_lines <- function(lines) { grep("^\\s*$", lines, invert = TRUE, value = TRUE) } line_regex <- paste0( "^\\s*", # leading whitespace "(?export\\s+)?", # export, if given "(?[^=]+)", # variable name "=", # equals sign "(?['\"]?)", # quote if present "(?.*)", # value "\\g{q}", # the same quote again "\\s*", # trailing whitespace "$" # end of line ) parse_dot_line <- function(line) { match <- regexpr(line_regex, line, perl = TRUE) if (match == -1) { stop("Cannot parse check.env: ", substr(line, 1, 40), call. = FALSE) } as.list(extract_match(line, match)[c("key", "value")]) } extract_match <- function(line, match) { tmp <- mapply( attr(match, "capture.start"), attr(match, "capture.length"), FUN = function(start, length) { tmp <- substr(line, start, start + length - 1) } ) names(tmp) <- attr(match, "capture.names") tmp } rcmdcheck/R/compare.R0000644000176200001440000000241714117731705014161 0ustar liggesusers #' Compare a set of check results to another check result #' #' @param old A check result, or a list of check results. #' @param new A check result. #' @return An `rcmdcheck_comparison` object with fields: #' * `package`: the name of the package, string, #' * `versions`: package versions, length two character, #' * `status`: comparison status, see below, #' * `old`: list of `rcmdcheck` objects the old check(s), #' * `new`: `rcmdcheck` object, the new check, #' * `cmp`: #' #' #' @family check comparisons #' @export compare_checks <- function(old, new) { if (inherits(old, "rcmdcheck")) old <- list(old) rcmdcheck_comparison(old, new) } compare_check_files <- function(old, new) { old <- parse_check(old) new <- parse_check(new) rcmdcheck_comparison(list(old), new) } #' Compare a check result to CRAN check results #' #' @param check A check result. #' @param flavours CRAN check flavour(s) to use. By default all #' platforms are used. #' @return An `rmdcheck_comparison` object. #' #' @family check comparisons #' @export compare_to_cran <- function(check, flavours = cran_check_flavours(check$package)) { pkg <- check$package cran <- cran_check_results(pkg, flavours = flavours) compare_checks(old = cran, new = check) } rcmdcheck/R/session-info.R0000644000176200001440000000160414123052257015137 0ustar liggesusers make_fake_profile <- function(package, session_output, libdir) { profile <- tempfile() args <- list( `__output__` = session_output, `__package__` = package, `__libdir__` = libdir ) expr <- substitute({ local({ reg.finalizer( .GlobalEnv, function(...) { tryCatch({ .libPaths(c(`__libdir__`, .libPaths())) si <- sessioninfo::session_info(pkgs = `__package__`) saveRDS(si, `__output__`) }, error = function(e) NULL) }, onexit = TRUE ) Sys.unsetenv("R_TESTS") }) }, args) cat(deparse(expr), sep = "\n", file = profile) profile } get_session_info <- function(package, session_output) { ## Extract session info for this package session_info <- tryCatch( suppressWarnings(readRDS(session_output)), error = function(e) NULL ) session_info } rcmdcheck/R/api.R0000644000176200001440000000320514120347676013304 0ustar liggesusers #' Query R CMD check results and parameters #' #' @param check A check result. #' @return A named list with elements: #' * `package`: package name. #' * `version`: package version. #' * `rversion`: R version. #' * `notes`: character vector of check NOTEs, each NOTE is an #' element. #' * `warnings`: character vector of check WARNINGs, each WARNING is an #' element. #' * `errors`: character vector of check ERRORs, each ERROR is an element. #' A check timeout adds an ERROR to this vector. #' * `platform`: check platform #' * `checkdir`: check directory. #' * `install_out`: the output of the installation, contents of the #' `00install.out` file. A single string. #' * `description`: the contents of the DESCRIPTION file of the package. #' A single string. #' * `session_info`: the output of [sessioninfo::session_info()], #' from the R session performing the checks. #' * `checkdir`: the path to the check directory, if it hasn't been #' cleaned up yet, or `NA`. The check directory is automatically #' cleaned up, when the check object is deleted (garbage collected). #' * `cran`: whether it is a CRAN packaged package. #' * `bioc`: whether it is a BioConductor package. #' #' @export check_details <- function(check) { list( package = check$package, version = check$version, notes = check$notes, warnings = check$warnings, errors = check$errors, platform = check$platform, checkdir = check$checkdir, install_out = check$install_out, description = check$description, session_info = check$session_info, cran = check$cran, bioc = check$bioc ) } rcmdcheck/NEWS.md0000644000176200001440000001163014123057145013276 0ustar liggesusers # 1.4.0 * `cran_check_results()` now downloads results in parallel, so it is much faster. * `rcmdcheck_process` now redirects the standard error to the standard output, to make sure that they are correctly interleaved (#148). * rcmdcheck now puts Rtools on the PATH, via pkgbuild (#111). * rcmdcheck now builds the manual when building the package, if it is needed for `\Sexpr{}` expressions (#137). * This version fixes a rare race condition that made rcmdcheck fail (#139). * rcmdcheck now safeguards against R deleting the user's home directory via an `R CMD build` bug (#120). * rcmdcheck can now ignore files in `inst/doc` when building a package. See the `Config/build/clean-inst-doc` package option in `?"rcmdcheck-config"` (#130). * It is now possible to turn on/off ANSI colors for rcmdcheck only, without affecting the checked package. See `?"rcmdcheck-config" and the `RCMDCHECK_NUM_COLORS` environment variable and the `rcmdcheck.num_colors` option (#119, @jimhester). * `print.rcmdcheck()` now has a `test_output` argument and `rcmdcheck.test_output` global option, to control whether to print the full test output or not. (#121) * RStudio's Pandoc is now on the path during `rcmdcheck()` and `rcmdcheck_process` (#109, #132, @dpprdan). * `rcmdcheck()` now errors if the check process crashes (#110, #163). * `rcmdcheck()` prints the check ouptut better interactively, especially when the package has multiple test files (#145, #161). * rcmdcheck can now ignore `NOTE`s, if requested, see `?rcmdcheck` for details (#12, #160). * rcmdcheck now always converts its output to UTF-8 from the native encoding. It also handles parsing check output in a non-native encoding better (#152). * rcmdcheck now ignored time stamps when comparing two check results (#128). * rcmdcheck now does not print extra empty lines in the interactive output on GitHub Actions. * rcmdcheck now uses a more robust implementation to extract the session info from the check process (#164). # 1.3.3 * `cran_check_results()` has now a `quiet` argument, and the download progress bars are shown if it is set to `FALSE` (#17). * Fix output when standard output does not support `\r`, typically when it is not a terminal (#94). * Fix standard output and standard error mixup in the test cases, (#88, #96). * Fix parsing test failures when multiple architectures are checked, (#97). * `rcmdcheck()` has now better colors. WARNINGs are magenta, and NOTEs are blue (#103, @hadley). # 1.3.2 * `rcmdcheck()` now correctly overwrites existing tarballs if they already exist in the check directory. This time for real. # 1.3.1 * `rcmdcheck()` now correctly overwrites existing tarballs if they already exist in the check directory (#84 @jimhester). * rcmdcheck now uses `sessioninfo::session_info()` to query session information for the check. # 1.3.0 * New `rcmdcheck_process` class to run `R CMD check` in the background. * `rcmdcheck()` now supports timeouts (default is 10 minutes). * Checks now capture and print installation and test failures. * Checks now record and print the duration of the check. * Checks now record and print session information from the check session (#22). * `rcmdcheck()` new keep files until the returned check object is deleted, if check was run in a temporary directory (the default) (#23). * New `xopen()` to show the check file in a file browser window (#61). * Checks now save `install.out` and also `DESCRIPTION` in the result, and save the standard error and the exit status as well. * `rcmdcheck()` printing is now better: the message from the check that is actually _being performed_ is shown on the screen. * `rcmdcheck()` now shows a spinner while running check. * `rcmdcheck()` results now have a `summary()` method for check comparisons. * `rcmdcheck()` results now have a new `check_details()` method, to query the check results programmatically. (No need to use `$errors`, `$warnings`, etc. directly.) * Checks now find package root automatically (#18). * `rcmdcheck()` now has an `error_on` argument to throw an error on an `R CMD check` failure (#51). * `rcmdcheck()` result printing is now better, the colors are consistent (#54). # 1.2.1 * Compare two check results with `compare_checks` or compare check results to CRAN with `compare_to_cran`. * The result object has more metadata: package name, version, R version and platform. * Refined printing of the result. * `rcmdcheck()` works on tarballs build via `R CMD build` now. * Parse `R CMD check` results: `parse_check`, `parse_check_url`. * Download and parse check results for CRAN packages. * Report errors during the build, typically vignette errors. * Use the `callr` package (https://github.com/r-lib/callr) for running `R CMD` commands. # 1.1.0 * New arguments `libpath` and `repos` to set the library path and the default CRAN repository * Do not run tests on CRAN. # 1.0.0 First public release. rcmdcheck/MD50000644000176200001440000001540114124357312012510 0ustar liggesusersf6ca683ef133cd384d406718018e88b1 *DESCRIPTION 51e9e0891b14449f167a1bcea3847206 *LICENSE f0927fd51ae473ef829406dd151acb78 *NAMESPACE 33c306091cc3597717b2c7a1a1510068 *NEWS.md 26d6f5a6a16a608264f93868b3fdb955 *R/api.R e3e7ba62568d70729146a90d14782012 *R/auto_clean.R 7f8a0a1ac8bb38fe32cbe4d0ab1be448 *R/background.R 61a712fe32bcc1016dbedfba219b0d84 *R/build.R a38c608c5156e5e8ee5308d2c767b7d9 *R/callback.R f83ee6f0a20afed2dfa00afa3d3853fa *R/compare.R b5542f2837d2cb2f799186fdf10a9469 *R/comparison-summary.R ca1b8a6e0cbd6e5daf2564b69c58c67a *R/comparison.R 14f0c1fdf13bf710a1ed3f981def68a6 *R/cran.R 9a7df9dd7d63a0c5f006f4893b26f8e9 *R/env.R 99add9f69aeb2e4ee154b6cf40759233 *R/error.R 6ec78296dbe35a3ef5335e24a7a59f36 *R/http.R bdd98daa9b1a391290f8fe87aaf037f2 *R/options.R 2c212fd1d446a01d2ef690947694dc42 *R/package.R 83a3202957c2e5642ca5c5651bb49bf8 *R/parse.R 0f62b5a8ad86ed4075d312bbab80ad8a *R/print.R 44726f220f6dbc3da9470bb4ff539ca9 *R/session-info.R 1c4788812d60f6c6a76660cdc9f76780 *R/styles.R 3a658440a93f66c2e5c7509b42dc1e60 *R/utils.R 1dbb429e25ec17084cfc3d3fddae8e9a *R/xopen.R 06b16976c557cb1f3441da2114b25626 *README.md f9aebe5b12f3be05bbe69a2e886322a3 *man/check_details.Rd c1feeb425b7669da69692c91f5eddf22 *man/compare_checks.Rd 5cf17dfa9fdd1e539f53a06f05fd6650 *man/compare_to_cran.Rd 032f6b0c8b86eb8cf1a4a9ec2139ddb3 *man/cran_check_flavours.Rd d077f1bb40f464ad85fa5e645834b6ce *man/cran_check_results.Rd 75ece5b94f138c8563306db9cafd3caf *man/data_frame.Rd d353258f0850feea650de5e6f7942d9a *man/myrep.Rd c814643ae18379ff2b3e741629f3009a *man/parse_check.Rd e0debcb268e343a4230229dfd616c8a3 *man/parse_check_url.Rd ff86f3954ef94486c952dbd68b17cac6 *man/print.rcmdcheck.Rd 0c6ab79d6908a89f67a4ef9df7ae04c7 *man/print.rcmdcheck_comparison.Rd f54fc08f3e02ac8c279894c8a098a4ea *man/rcmdcheck-config.Rd 5952cfcbf35ef5668ffabcbb5fd0bc2b *man/rcmdcheck.Rd 74710a0cde1f56897e85f398f9a6952e *man/rcmdcheck_process.Rd fb9540d69c07a494642d660741509a3a *man/xopen.rcmdcheck.Rd 2539d24ffc8ea7e94ea08df088e31ad9 *tests/testthat.R ac50aafdeaf88103d295627a083ea63a *tests/testthat/REDCapR-fail.log da2300b56ec5144c7dc6347e6553345e *tests/testthat/REDCapR-ok.log 3302decba9f20f8c32833b8843b80800 *tests/testthat/RSQLServer-install/00check.log c3a48909f4f308edd658a9b765d5f912 *tests/testthat/RSQLServer-install/00install.out f0c327c900f057a573f927c4dbabc09d *tests/testthat/_snaps/callback.md 69216f4988043aa0a31c122c45bb165b *tests/testthat/_snaps/comparison.md d405667f8669e1e2c71f5ade70cb834c *tests/testthat/_snaps/parse.md 21159c1a0e758f33d854c1c4a544d15f *tests/testthat/_snaps/utils.md 91943fa6c447053b812cb086c81bbc14 *tests/testthat/bad1/DESCRIPTION 82f1b9c0f341ed20b3df56f668e4e0ec *tests/testthat/bad1/NAMESPACE b0e9d02fe1d9680c0e23c88f7c8b3a30 *tests/testthat/bad1/R/package.R a387cec3225581d4ac4d784663343d0c *tests/testthat/bad1/man/foobar2.Rd ec08c12c262073d689682c731b723898 *tests/testthat/bad1/tests/testthat.R 2143596857c29fecb66929cb8a030360 *tests/testthat/bad1/tests/testthat/test-bad.R cdeeef6c26b41007692a4f6535137ac2 *tests/testthat/bad1/tools/check.env c92f1e87367ca60cef2cd8404d9cd5a6 *tests/testthat/bad1/vignettes/test.Rmd 1b9e4f3f5a54c4abfa8a376f3ad8560e *tests/testthat/bad2/DESCRIPTION 386a9453b5f25bdc3086b03fbc9b60a3 *tests/testthat/bad2/NAMESPACE aa975e44511c795eb7f217ea7eddbe1e *tests/testthat/bad2/R/package.R fbccb380f15b67427c2c87816bbb0de2 *tests/testthat/bad3/DESCRIPTION 82f1b9c0f341ed20b3df56f668e4e0ec *tests/testthat/bad3/NAMESPACE 2fda064a2a1b221b7950d7f37fd5d6bc *tests/testthat/bad3/R/package.R a387cec3225581d4ac4d784663343d0c *tests/testthat/bad3/man/foobar2.Rd ec08c12c262073d689682c731b723898 *tests/testthat/bad3/tests/testthat.R 77b37c1bd61df642168cd1d412509c6f *tests/testthat/bad3/tests/testthat/test-bad.R c92f1e87367ca60cef2cd8404d9cd5a6 *tests/testthat/bad3/vignettes/test.Rmd fbccb380f15b67427c2c87816bbb0de2 *tests/testthat/bad4/DESCRIPTION 82f1b9c0f341ed20b3df56f668e4e0ec *tests/testthat/bad4/NAMESPACE 56edef25da05adbf2a0513ad1bb240b2 *tests/testthat/bad4/R/package.R a387cec3225581d4ac4d784663343d0c *tests/testthat/bad4/man/foobar2.Rd 8ccff755ebaa14110458784c666a8c5d *tests/testthat/bikedata-ok.log 953f7dcb43b00558f4147898c835022d *tests/testthat/dataonderivatives-test/00check.log d94f93baf7fca49b08423c936b28c178 *tests/testthat/dataonderivatives-test/00install.out 12b794693fcd743b9c144e1016fe226a *tests/testthat/dataonderivatives-test/tests/testthat.Rout.fail 62326416d70206fbbc72c67f9abee5fe *tests/testthat/fixtures/bad-tests.tar.gz fef910f8d90e17ec29909c848e3f53bc *tests/testthat/fixtures/badenc.fail b8555e4f8c73e0c5031b056bf8258f5d *tests/testthat/fixtures/badpackage_1.0.0.tar.gz 692779a59097a2ee29258ab9fa27975b *tests/testthat/fixtures/checks/check_flavors.html da1031bb2a573f7fdd8c18844c478750 *tests/testthat/fixtures/checks/comparing.txt 8fcdb98d2459eb525a30a5573ac1bd85 *tests/testthat/fixtures/checks/comparing2.txt 15ef446dbaa566de69f9e47ec6436dee *tests/testthat/fixtures/checks/r-devel-linux-x86_64-debian-clang/rcmdcheck-00check.txt 10ff31f28166c52d15813e05d22a715a *tests/testthat/fixtures/checks/r-devel-linux-x86_64-debian-gcc/rcmdcheck-00check.txt ed364dd9a58b1ee8bde4da35e85f05c3 *tests/testthat/fixtures/checks/r-release-windows-ix86+x86_64/rcmdcheck-00check.txt 9b427f91537c371b322197499e50a0a8 *tests/testthat/fixtures/checks/test-error.txt fe47e0a5876277dac0a9afdd8dd05d51 *tests/testthat/fixtures/iso8859-15.rds 08bccb1cacf0536c4b0d81b7c0d15c58 *tests/testthat/fixtures/run1.rds b19dd00e5ef5ae587b18d81b2de13d93 *tests/testthat/fixtures/test-error.txt 2f6d45c596f6a7d991391b4454d5f2a2 *tests/testthat/fixtures/tests-as-cran.txt 7d29b820189c4f75fe052db682b1a228 *tests/testthat/fixtures/tests-not-as-cran.txt a07c41cd32c9f968ef7a4ee61e19515a *tests/testthat/fixtures/win.rds 5503cbaa190b62cce0eda8ce563bcbf1 *tests/testthat/helpers.R 84e7a8b20194ff3a390b3aa24c023990 *tests/testthat/minimal-ee.log fcd7f77cac7157a494b44b584bf000e8 *tests/testthat/minimal-ewn.log 0fb2d99463eb17315b0d138011314519 *tests/testthat/minimal-ok.log 0c831b7d8d5acee9ce2406ab22ed020c *tests/testthat/test-auto_clean.R 13d5fbf64b47eb8675da88592c03152a *tests/testthat/test-build.R 7045610fc23e0b963bfd2a79c8d49425 *tests/testthat/test-callback.R 02c62fd30ff60a4f05aba7dc07b81deb *tests/testthat/test-color.R 7b6adc42014ba86a91ad1024a498d77c *tests/testthat/test-comparison.R 16124fa949811d8715003b46e8e54238 *tests/testthat/test-cran.R 09282325aaf4debade48fc0a2de4a72d *tests/testthat/test-crash.R 9023f295721558fdb21d9891a156c7b4 *tests/testthat/test-env.R 2e3ebfe3f6accab5764b8d7f704882b9 *tests/testthat/test-errors.R cc499fdcd5ded4dbcac7e46069757e7b *tests/testthat/test-http.R ffc9e15543840318d5c48b9ba7994257 *tests/testthat/test-parse.R 8bc264a9137212bd221457d7f12a5a62 *tests/testthat/test-rcmdcheck.R 3e43ae0da83b5898e92622e9caae7364 *tests/testthat/test-tests.R 14ab5d0f4b68a321d071c4542006ab8b *tests/testthat/test-utils.R