This is an automated email from the ASF dual-hosted git repository.

assignuser pushed a commit to branch maint-20.0.0
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit aa6c0c057e6876253e57a9dfaf8771a90478fa4a
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sat Apr 5 09:29:42 2025 +0900

    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]>
---
 ci/scripts/r_test.sh           | 5 +++--
 r/tests/testthat/helper-skip.R | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.sh
index 67142b66dd..34bef3cc15 100755
--- a/ci/scripts/r_test.sh
+++ b/ci/scripts/r_test.sh
@@ -101,7 +101,7 @@ SCRIPT="as_cran <- 
!identical(tolower(Sys.getenv('NOT_CRAN')), 'true')
     build_args <- '--no-build-vignettes'
   }
 
-  if (requireNamespace('reticulate', quietly = TRUE) && 
reticulate::py_module_available('pyarrow')) {
+  if (!as_cran && requireNamespace('reticulate', quietly = TRUE) && 
reticulate::py_module_available('pyarrow')) {
       message('Running flight demo server for tests.')
       pid_flight <- sys::exec_background(
           'python',
@@ -130,7 +130,8 @@ echo "$SCRIPT" | ${R_BIN} --no-save
 
 AFTER=$(ls -alh ~/)
 if [ "$NOT_CRAN" != "true" ] && [ "$BEFORE" != "$AFTER" ]; then
-  ls -alh ~/.cmake/packages
+  # Ignore ~/.TinyTex/ and ~/R/ because it has many files.
+  find ~ -path ~/.TinyTeX -prune -or -path ~/R/ -prune -or -print
   exit 1
 fi
 popd
diff --git a/r/tests/testthat/helper-skip.R b/r/tests/testthat/helper-skip.R
index bd29080848..ce2ad34e9f 100644
--- a/r/tests/testthat/helper-skip.R
+++ b/r/tests/testthat/helper-skip.R
@@ -57,6 +57,7 @@ skip_if_no_pyarrow <- function() {
     return()
   }
 
+  skip_on_cran()
   skip_on_linux_devel()
   skip_on_os("windows")
 

Reply via email to