You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2013/10/01 06:48:48 UTC
svn commit: r1527883 [6/6] - in /hive/branches/tez: ./
ant/src/org/apache/hadoop/hive/ant/
beeline/src/java/org/apache/hive/beeline/ bin/
common/src/java/org/apache/hadoop/hive/conf/ conf/
contrib/src/java/org/apache/hadoop/hive/contrib/fileformat/base...
Modified: hive/branches/tez/testutils/ptest2/src/main/resources/batch-exec.vm
URL: http://svn.apache.org/viewvc/hive/branches/tez/testutils/ptest2/src/main/resources/batch-exec.vm?rev=1527883&r1=1527882&r2=1527883&view=diff
==============================================================================
--- hive/branches/tez/testutils/ptest2/src/main/resources/batch-exec.vm (original)
+++ hive/branches/tez/testutils/ptest2/src/main/resources/batch-exec.vm Tue Oct 1 04:48:44 2013
@@ -23,7 +23,11 @@ chmod -R u+w $logDir
rm -rf $logDir
# makes $logDir and $logDir/tmp
mkdir -p $logDir/tmp
-if [[ -n "${javaHome}" ]]
+if [[ -n "${javaHomeForTests}" ]]
+then
+ export JAVA_HOME=$javaHomeForTests
+ export PATH=$JAVA_HOME/bin/:$PATH
+elif [[ -n "${javaHome}" ]]
then
export JAVA_HOME=$javaHome
export PATH=$JAVA_HOME/bin/:$PATH
Modified: hive/branches/tez/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java
URL: http://svn.apache.org/viewvc/hive/branches/tez/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java?rev=1527883&r1=1527882&r2=1527883&view=diff
==============================================================================
--- hive/branches/tez/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java (original)
+++ hive/branches/tez/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.java Tue Oct 1 04:48:44 2013
@@ -78,6 +78,30 @@ public class TestScripts {
Approvals.verify(actual);
}
@Test
+ public void testAlternativeTestJVM() throws Throwable {
+ Map<String, String> templateVariables = Maps.newHashMap();
+ templateVariables.put("repository", "git:///repo1");
+ templateVariables.put("repositoryName", "apache");
+ templateVariables.put("branch", "branch-1");
+ templateVariables.put("localDir", "/some/local/dir");
+ templateVariables.put("workingDir", "/some/working/dir");
+ templateVariables.put("antArgs", "-Dant=arg1");
+ templateVariables.put("buildTag", "build-1");
+ templateVariables.put("logDir", "/some/log/dir");
+ templateVariables.put("instanceName", "instance-1");
+ templateVariables.put("batchName","batch-1");
+ templateVariables.put("numOfFailedTests", "20");
+ templateVariables.put("maxSourceDirs", String.valueOf(5));
+ templateVariables.put("testArguments", "-Dtest=arg1");
+ templateVariables.put("clearLibraryCache", "true");
+ templateVariables.put("javaHome", "/usr/java/jdk1.7");
+ templateVariables.put("javaHomeForTests", "/usr/java/jdk1.7-other");
+ templateVariables.put("antEnvOpts", "-Dhttp.proxyHost=somehost -Dhttp.proxyPort=3128");
+ String template = readResource("batch-exec.vm");
+ String actual = getTemplateResult(template, templateVariables);
+ Approvals.verify(actual);
+ }
+ @Test
public void testPrepNone() throws Throwable {
Map<String, String> templateVariables = Maps.newHashMap();
templateVariables.put("repository", "git:///repo1");
Modified: hive/branches/tez/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt
URL: http://svn.apache.org/viewvc/hive/branches/tez/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt?rev=1527883&r1=1527882&r2=1527883&view=diff
==============================================================================
--- hive/branches/tez/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt (original)
+++ hive/branches/tez/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestScripts.testBatch.approved.txt Tue Oct 1 04:48:44 2013
@@ -22,7 +22,11 @@ chmod -R u+w /some/log/dir
rm -rf /some/log/dir
# makes /some/log/dir and /some/log/dir/tmp
mkdir -p /some/log/dir/tmp
-if [[ -n "/usr/java/jdk1.7" ]]
+if [[ -n "${javaHomeForTests}" ]]
+then
+ export JAVA_HOME=$javaHomeForTests
+ export PATH=$JAVA_HOME/bin/:$PATH
+elif [[ -n "/usr/java/jdk1.7" ]]
then
export JAVA_HOME=/usr/java/jdk1.7
export PATH=$JAVA_HOME/bin/:$PATH