Skip to content

Intermittent failures to run tests on Windows #424

@PietrH

Description

@PietrH

From time to time my R CMD CHECK action is failing to run the testthat tests on Windows:

* checking tests ...
  Running 'testthat.R'
 ERROR
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(etn)
  > 
  > test_check("etn")
* DONE

Status: 1 ERROR, 1 NOTE
See
  'D:/a/etn/etn/check/etn.Rcheck/00check.log'
for details.

── R CMD check results ───────────────────────────────────── etn 2.2.2.9000 ────
Duration: 2m 38.1s

❯ checking tests ...
  See below...

❯ checking DESCRIPTION meta-information ... NOTE
  License stub is invalid DCF.

── Test failures ───────────────────────────────────────────────── testthat ────

> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/tests.html
> # * https://testthat.r-lib.org/reference/test_package.html#special-files
> 
> library(testthat)
> library(etn)
> 
> test_check("etn")

1 error ✖ | 0 warnings ✔ | 1 note ✖
Error: Error: R CMD check found ERRORs
Execution halted
Error: Process completed with exit code 1.
Run ## --------------------------------------------------------------------
Show testthat output
  
  R version 4.5.1 (2025-06-13 ucrt) -- "Great Square Root"
  Copyright (C) 2025 The R Foundation for Statistical Computing
  Platform: x86_64-w64-mingw32/x64
  
  R is free software and comes with ABSOLUTELY NO WARRANTY.
  You are welcome to redistribute it under certain conditions.
  Type 'license()' or 'licence()' for distribution details.
  
  R is a collaborative project with many contributors.
  Type 'contributors()' for more information and
  'citation()' on how to cite R or R packages in publications.
  
  Type 'demo()' for some demos, 'help()' for on-line help, or
  'help.start()' for an HTML browser interface to help.
  Type 'q()' to quit R.
  
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(etn)
  > 
  > test_check("etn")

It doesn't seem to report why, and subsequent runs do pass. Very strange.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdevImprovements to development workflow

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions