From d851c29ea1284a0280f1d3a5254edf1460e231b7 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Tue, 30 Dec 2025 11:10:06 -0600 Subject: [PATCH 1/2] Refine when we skip running all tests --- ChangeLog | 5 +++++ tests/tinytest.R | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5e13f1cbf..062dc6860 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025-12-30 Dirk Eddelbuettel + + * tests/tinytest.R: Refine decision of when not to run all tests even + when development version number is seen + 2025-12-28 Dirk Eddelbuettel * README.md: Replace installation from drat section with r-universe diff --git a/tests/tinytest.R b/tests/tinytest.R index 5dc5fc2b8..11dc47439 100644 --- a/tests/tinytest.R +++ b/tests/tinytest.R @@ -1,6 +1,18 @@ if (requireNamespace("tinytest", quietly=TRUE)) { + ## if OMP_THREAD_LIMIT is set, and its value is 2, we have a good + ## idea of where we are and we likely do not want to run all tests + if (Sys.getenv("OMP_THREAD_LIMIT", unset="") != "" && # it is set + Sys.getenv("OMP_THREAD_LIMIT") == "2") { # value is two + if (Sys.getenv("RunAllRcppTests", "") != "") { # if unset + Sys.setenv("RunAllRcppTests"="no") + } + if (Sys.getenv("RunVerboseRcppTests", "") != "") { # if unset + Sys.setenv("RunVerboseRcppTests"="no") + } + } + ## Force tests to be executed if in dev release which we define as ## having a sub-release, eg 0.9.15.5 is one whereas 0.9.16 is not if (length(strsplit(format(packageVersion("Rcpp")), "\\.")[[1]]) > 3) { # dev rel, and From fb63b94ff4d8cf440a5eda991845a55fd32a3a08 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Wed, 31 Dec 2025 10:38:00 -0600 Subject: [PATCH 2/2] Simplified condition expression --- tests/tinytest.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/tinytest.R b/tests/tinytest.R index 11dc47439..61cc2b8a7 100644 --- a/tests/tinytest.R +++ b/tests/tinytest.R @@ -3,8 +3,7 @@ if (requireNamespace("tinytest", quietly=TRUE)) { ## if OMP_THREAD_LIMIT is set, and its value is 2, we have a good ## idea of where we are and we likely do not want to run all tests - if (Sys.getenv("OMP_THREAD_LIMIT", unset="") != "" && # it is set - Sys.getenv("OMP_THREAD_LIMIT") == "2") { # value is two + if (Sys.getenv("OMP_THREAD_LIMIT", unset="") == "2") { # set and 2 if (Sys.getenv("RunAllRcppTests", "") != "") { # if unset Sys.setenv("RunAllRcppTests"="no") }