Skip to content
Snippets Groups Projects
Commit 8feb799a authored by Felix Cheung's avatar Felix Cheung Committed by Felix Cheung
Browse files

[SPARK-20197][SPARKR] 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.

Author: Felix Cheung <felixcheung_m@hotmail.com>

Closes #17516 from felixcheung/rdircheckincran.
parent 870b9d9a
No related branches found
No related tags found
No related merge requests found
......@@ -22,12 +22,13 @@ library(SparkR)
options("warn" = 2)
# Setup global test environment
# Install Spark first to set SPARK_HOME
install.spark()
sparkRDir <- file.path(Sys.getenv("SPARK_HOME"), "R")
sparkRFilesBefore <- list.files(path = sparkRDir, all.files = TRUE)
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")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment