Repository: spark
Updated Branches:
  refs/heads/branch-2.1 968eace85 -> ca144106b


[SPARK-20197][SPARKR][BRANCH-2.1] CRAN check fail with package installation

## What changes were proposed in this pull request?

Test failed because SPARK_HOME is not set before Spark is installed.
Also current directory is not == SPARK_HOME when tests are run with R CMD 
check, unlike in Jenkins, so disable that test for now. (that would also 
disable the test in Jenkins - so this change should not be ported to master 
as-is.)

## How was this patch tested?

Manual run R CMD check

Author: Felix Cheung <felixcheun...@hotmail.com>

Closes #17515 from felixcheung/rcrancheck.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ca144106
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ca144106
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ca144106

Branch: refs/heads/branch-2.1
Commit: ca144106b8fb1c7790010cc68c072861bbd2d34a
Parents: 968eace
Author: Felix Cheung <felixcheun...@hotmail.com>
Authored: Sun Apr 2 19:44:14 2017 -0700
Committer: Felix Cheung <felixche...@apache.org>
Committed: Sun Apr 2 19:44:14 2017 -0700

----------------------------------------------------------------------
 R/pkg/inst/tests/testthat/test_sparkSQL.R | 2 ++
 R/pkg/tests/run-all.R                     | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/ca144106/R/pkg/inst/tests/testthat/test_sparkSQL.R
----------------------------------------------------------------------
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R 
b/R/pkg/inst/tests/testthat/test_sparkSQL.R
index fcaa2e8..6285124 100644
--- a/R/pkg/inst/tests/testthat/test_sparkSQL.R
+++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R
@@ -2851,6 +2851,8 @@ compare_list <- function(list1, list2) {
 
 # This should always be the **very last test** in this test file.
 test_that("No extra files are created in SPARK_HOME by starting session and 
making calls", {
+  skip_on_cran()
+
   # Check that it is not creating any extra file.
   # Does not check the tempdir which would be cleaned up after.
   filesAfter <- list.files(path = sparkRDir, all.files = TRUE)

http://git-wip-us.apache.org/repos/asf/spark/blob/ca144106/R/pkg/tests/run-all.R
----------------------------------------------------------------------
diff --git a/R/pkg/tests/run-all.R b/R/pkg/tests/run-all.R
index cefaadd..9b75d95 100644
--- a/R/pkg/tests/run-all.R
+++ b/R/pkg/tests/run-all.R
@@ -21,6 +21,8 @@ library(SparkR)
 # Turn all warnings into errors
 options("warn" = 2)
 
+install.spark()
+
 # Setup global test environment
 sparkRDir <- file.path(Sys.getenv("SPARK_HOME"), "R")
 sparkRFilesBefore <- list.files(path = sparkRDir, all.files = TRUE)
@@ -28,6 +30,4 @@ sparkRWhitelistSQLDirs <- c("spark-warehouse", "metastore_db")
 invisible(lapply(sparkRWhitelistSQLDirs,
                  function(x) { unlink(file.path(sparkRDir, x), recursive = 
TRUE, force = TRUE)}))
 
-install.spark()
-
 test_package("SparkR")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to