From 77d94003d2d400b643a53f5f2d39fc7a9d23e714 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Fri, 27 Sep 2024 12:00:24 +0200 Subject: [PATCH] Export `IS_TESTING` from `harp::` --- crates/ark/src/modules.rs | 3 +-- crates/ark/src/sys/unix/interface.rs | 2 +- crates/harp/src/lib.rs | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ark/src/modules.rs b/crates/ark/src/modules.rs index 7ed403024..7fdbcc818 100644 --- a/crates/ark/src/modules.rs +++ b/crates/ark/src/modules.rs @@ -11,7 +11,6 @@ use harp::environment::R_ENVS; use harp::exec::RFunction; use harp::exec::RFunctionExt; use harp::r_symbol; -use harp::test::IS_TESTING; use harp::utils::r_poke_option; use libr::Rf_ScalarLogical; use libr::SEXP; @@ -77,7 +76,7 @@ pub struct ArkEnvs { pub fn initialize() -> anyhow::Result<()> { // If we are `testing`, set the corresponding R level global option - if IS_TESTING { + if harp::IS_TESTING { r_poke_option_ark_testing() } diff --git a/crates/ark/src/sys/unix/interface.rs b/crates/ark/src/sys/unix/interface.rs index 56856f6da..517aecb93 100644 --- a/crates/ark/src/sys/unix/interface.rs +++ b/crates/ark/src/sys/unix/interface.rs @@ -75,7 +75,7 @@ pub fn setup_r(mut args: Vec<*mut c_char>) { // // This must be called _after_ `Rf_initialize_R()`, since that's where R // detects the stack size and sets the default limit. - if harp::test::IS_TESTING { + if harp::IS_TESTING { libr::set(libr::R_CStackLimit, usize::MAX); } diff --git a/crates/harp/src/lib.rs b/crates/harp/src/lib.rs index 134ace71b..53abac620 100644 --- a/crates/harp/src/lib.rs +++ b/crates/harp/src/lib.rs @@ -62,6 +62,7 @@ pub use harp::object::list_get; pub use harp::object::list_poke; pub use harp::object::RObject; pub use harp::symbol::RSymbol; +pub use harp::test::IS_TESTING; pub use harp::utils::get_option; pub use harp_macros::register;