Repository: spark
Updated Branches:
  refs/heads/branch-2.2 7a97943f2 -> 41f705a57


[SPARK-22889][SPARKR] Set overwrite=T when install SparkR in tests

## What changes were proposed in this pull request?

Since all CRAN checks go through the same machine, if there is an older partial 
download or partial install of Spark left behind the tests fail. This PR 
overwrites the install files when running tests. This shouldn't affect Jenkins 
as `SPARK_HOME` is set when running Jenkins tests.

## How was this patch tested?

Test manually by running `R CMD check --as-cran`

Author: Shivaram Venkataraman <shiva...@cs.berkeley.edu>

Closes #20060 from shivaram/sparkr-overwrite-cran.

(cherry picked from commit 1219d7a4343e837749c56492d382b3c814b97271)
Signed-off-by: Felix Cheung <felixche...@apache.org>


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

Branch: refs/heads/branch-2.2
Commit: 41f705a579706464f31fb2ea444014bbd0559d22
Parents: 7a97943
Author: Shivaram Venkataraman <shiva...@cs.berkeley.edu>
Authored: Sat Dec 23 10:27:14 2017 -0800
Committer: Felix Cheung <felixche...@apache.org>
Committed: Sat Dec 23 10:27:35 2017 -0800

----------------------------------------------------------------------
 R/pkg/tests/run-all.R | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/41f705a5/R/pkg/tests/run-all.R
----------------------------------------------------------------------
diff --git a/R/pkg/tests/run-all.R b/R/pkg/tests/run-all.R
index 4a897d5..1ff9ca9 100644
--- a/R/pkg/tests/run-all.R
+++ b/R/pkg/tests/run-all.R
@@ -27,7 +27,10 @@ if (.Platform$OS.type == "windows") {
 
 # Setup global test environment
 # Install Spark first to set SPARK_HOME
-install.spark()
+
+# NOTE(shivaram): We set overwrite to handle any old tar.gz files or 
directories left behind on
+# CRAN machines. For Jenkins we should already have SPARK_HOME set.
+install.spark(overwrite = TRUE)
 
 sparkRDir <- file.path(Sys.getenv("SPARK_HOME"), "R")
 sparkRWhitelistSQLDirs <- c("spark-warehouse", "metastore_db")


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

Reply via email to