You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2012/04/07 06:12:44 UTC
svn commit: r1310667 -
/ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml
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"/>