Skip to content

Commit aa6c0c0

Browse files
kouassignUser
authored andcommitted
GH-45714: [CI][R] Don't run tests that use reticulate on CRAN (#46026)
### Rationale for this change reticulate may create some files in home directory. It's not desired on CRAN. ### What changes are included in this PR? Disable tests that use reticulate. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #45714 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 81c9510 commit aa6c0c0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ci/scripts/r_test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ SCRIPT="as_cran <- !identical(tolower(Sys.getenv('NOT_CRAN')), 'true')
101101
build_args <- '--no-build-vignettes'
102102
}
103103
104-
if (requireNamespace('reticulate', quietly = TRUE) && reticulate::py_module_available('pyarrow')) {
104+
if (!as_cran && requireNamespace('reticulate', quietly = TRUE) && reticulate::py_module_available('pyarrow')) {
105105
message('Running flight demo server for tests.')
106106
pid_flight <- sys::exec_background(
107107
'python',
@@ -130,7 +130,8 @@ echo "$SCRIPT" | ${R_BIN} --no-save
130130

131131
AFTER=$(ls -alh ~/)
132132
if [ "$NOT_CRAN" != "true" ] && [ "$BEFORE" != "$AFTER" ]; then
133-
ls -alh ~/.cmake/packages
133+
# Ignore ~/.TinyTex/ and ~/R/ because it has many files.
134+
find ~ -path ~/.TinyTeX -prune -or -path ~/R/ -prune -or -print
134135
exit 1
135136
fi
136137
popd

r/tests/testthat/helper-skip.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ skip_if_no_pyarrow <- function() {
5757
return()
5858
}
5959

60+
skip_on_cran()
6061
skip_on_linux_devel()
6162
skip_on_os("windows")
6263

0 commit comments

Comments
 (0)