diff --git a/tests/extendrtests/src/rust/Cargo.toml b/tests/extendrtests/src/rust/Cargo.toml index b0b422f9ae..6307db3cc0 100644 --- a/tests/extendrtests/src/rust/Cargo.toml +++ b/tests/extendrtests/src/rust/Cargo.toml @@ -22,3 +22,4 @@ libR-sys = "*" [patch.crates-io] # root is `tests/extendrtests/src/rust` extendr-api = { path = "../../../../extendr-api/" } +libR-sys = { path = "../../../../libR-sys/" } diff --git a/xtask/src/extendrtests/with_absolute_path.rs b/xtask/src/extendrtests/with_absolute_path.rs index 141ae0b046..e6ae4b83df 100644 --- a/xtask/src/extendrtests/with_absolute_path.rs +++ b/xtask/src/extendrtests/with_absolute_path.rs @@ -41,10 +41,20 @@ pub(crate) fn swap_extendr_api_path(shell: &Shell) -> Result Result String { +fn get_replacement_path_extendr_api(path: &Path) -> String { let path = path.adjust_for_r(); format!("{path}/extendr-api") } +#[allow(non_snake_case)] +fn get_replacement_path_libR_sys(path: &Path) -> String { + let path = path.adjust_for_r(); + + format!("{path}/libR-sys") +} + fn get_extendr_api_entry(document: &mut Document) -> Option<&mut Value> { document .get_mut("patch")? @@ -66,6 +83,15 @@ fn get_extendr_api_entry(document: &mut Document) -> Option<&mut Value> { .as_value_mut() } +#[allow(non_snake_case)] +fn get_libR_sys_entry(document: &mut Document) -> Option<&mut Value> { + document + .get_mut("patch")? + .get_mut("crates-io")? + .get_mut("libR-sys")? + .as_value_mut() +} + fn read_file_with_line_ending>( shell: &Shell, path: P,