Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C30A7C1FF for ; Tue, 1 Oct 2013 04:49:46 +0000 (UTC) Received: (qmail 39556 invoked by uid 500); 1 Oct 2013 04:49:44 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 39518 invoked by uid 500); 1 Oct 2013 04:49:44 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 39510 invoked by uid 99); 1 Oct 2013 04:49:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Oct 2013 04:49:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Oct 2013 04:49:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 59F462388BF1; Tue, 1 Oct 2013 04:48:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 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... Date: Tue, 01 Oct 2013 04:48:48 -0000 To: commits@hive.apache.org From: gunther@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131001044855.59F462388BF1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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 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