ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1310667 - /ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml
Date Sat, 07 Apr 2012 04:12:44 GMT
Author: bodewig
Date: Sat Apr  7 04:12:44 2012
New Revision: 1310667

URL: http://svn.apache.org/viewvc?rev=1310667&view=rev
Log:
Maybe java simply isn't on the PATH on the Jenkins boxes

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml?rev=1310667&r1=1310666&r2=1310667&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml Sat Apr  7 04:12:44 2012
@@ -630,16 +630,24 @@
     
     <target name="testDoesntWaitForChildren"
             description="https://issues.apache.org/bugzilla/show_bug.cgi?id=5003">
+      <condition property="java"
+                 value="${java.home}/bin/javaw.exe"
+                 else="${java.home}/bin/java">
+        <os family="dos"/>
+      </condition>
       <mkdir dir="${input}/org/example"/>
       <pathconvert dirsep="/" property="out">
         <path location="${output}"/>
       </pathconvert>
+      <pathconvert dirsep="/" property="javaP">
+        <path location="${java}"/>
+      </pathconvert>
       <echo file="${input}/org/example/CallHello.java"><![CDATA[
 package org.example;
 public class CallHello {
     public static void main(String[] args)
         throws Exception {
-        Runtime.getRuntime().exec("java -cp ${out} org.example.Hello");
+        Runtime.getRuntime().exec("${javaP} -cp ${out} org.example.Hello");
         Thread.sleep(1 * 1000);
         System.out.println("finished");
     }
@@ -658,7 +666,7 @@ public class Hello {
 }]]></echo>
       <mkdir dir="${output}"/>
       <javac srcdir="${input}" destdir="${output}"/>
-      <exec executable="java" failonerror="true">
+      <exec executable="${java}" failonerror="true">
         <arg line="-cp ${output} org.example.CallHello"/>
       </exec>
       <au:assertLogContains text="finished"/>



Mime
View raw message