From 2d0825e9f4f4059e0008c5753840b73893667701 Mon Sep 17 00:00:00 2001 From: Prashant Sharma Date: Mon, 6 Jan 2014 16:03:31 +0530 Subject: [PATCH] Made java options to be applied during tests so that they become self explanatory. --- project/SparkBuild.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index a6c560d5c6bae..eda925227ea67 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -70,9 +70,7 @@ object SparkBuild extends Build { lazy val MavenCompile = config("m2r") extend(Compile) lazy val publishLocalBoth = TaskKey[Unit]("publish-local", "publish local for m2 and ivy") val sparkHome = System.getProperty("user.dir") - System.setProperty("spark.home", sparkHome) - System.setProperty("spark.testing", "1") - + // Allows build configuration to be set through environment variables lazy val hadoopVersion = Properties.envOrElse("SPARK_HADOOP_VERSION", DEFAULT_HADOOP_VERSION) lazy val isNewHadoop = Properties.envOrNone("SPARK_IS_NEW_HADOOP") match { @@ -115,8 +113,8 @@ object SparkBuild extends Build { // Fork new JVMs for tests and set Java options for those fork := true, - javaOptions += "-Dspark.home=" + sparkHome, - javaOptions += "-Dspark.testing=1", + javaOptions in Test += "-Dspark.home=" + sparkHome, + javaOptions in Test += "-Dspark.testing=1", javaOptions += "-Xmx3g", // Show full stack trace and duration in test cases. testOptions in Test += Tests.Argument("-oDF"),