You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/21 16:56:22 UTC

[GitHub] [arrow] jonkeane commented on a diff in pull request #12940: ARROW-15015: [R] Test / CI flag for ensuring all tests are run?

jonkeane commented on code in PR #12940:
URL: https://github.com/apache/arrow/pull/12940#discussion_r855398680


##########
r/tests/testthat/helper-skip.R:
##########
@@ -69,12 +76,14 @@ skip_on_linux_devel <- function() {
 }
 
 skip_if_r_version <- function(r_version) {
+  if (force_tests) return()
   if (getRversion() <= r_version) {
     skip(paste("R version:", getRversion()))
   }
 }
 
 process_is_running <- function(x) {
+  if (force_tests) return(TRUE)

Review Comment:
   A comment here about what is going on here would be nice, since it's slightly different from other places



##########
r/tests/testthat/helper-skip.R:
##########
@@ -21,7 +21,10 @@ build_features <- c(
   uncompressed = TRUE
 )
 
+force_tests <- identical(tolower(Sys.getenv("ARROW_R_FORCE_TESTS")), "true")
+
 skip_if_not_available <- function(feature) {
+  if (force_tests) return()

Review Comment:
   This is a minor style thing, but if there's an early return, we should make sure that goes on a separate line:
   
   ```suggestion
     if (force_tests) {
       return()
     }
   ```



##########
r/tests/testthat/helper-skip.R:
##########
@@ -21,7 +21,10 @@ build_features <- c(
   uncompressed = TRUE
 )
 
+force_tests <- identical(tolower(Sys.getenv("ARROW_R_FORCE_TESTS")), "true")

Review Comment:
   This is probably fine like it is, but if we wrapped this in a function, it would behave more like we expect — we wouldn't need to think about when this line is sourced



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org