You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ke...@apache.org on 2006/12/13 10:55:56 UTC
svn commit: r486570 -
/ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
Author: kevj
Date: Wed Dec 13 01:55:55 2006
New Revision: 486570
URL: http://svn.apache.org/viewvc?view=rev&rev=486570
Log:
-fix hasfreespace-test to avoid problems on pre jdk6 vms
Modified:
ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
Modified: ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml?view=diff&rev=486570&r1=486569&r2=486570
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml Wed Dec 13 01:55:55 2006
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<project name="hasfreespace-test" default="all" basedir="." xmlns:au="antlib:org.apache.ant.antunit">
+ <available property="jdk6.available" classname="java.util.ServiceLoader"/>
+
<target name="test-not-enough-space-human">
<au:assertFalse>
<hasfreespace partition="c:" needed="1P"/>
@@ -26,7 +28,7 @@
</au:assertTrue>
</target>
- <target name="all">
+ <target name="all" if="jdk6.available">
<au:antunit>
<fileset file="${ant.file}"/>
<au:plainlistener/>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: svn commit: r486570 - /ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
Posted by Kevin Jackson <fo...@gmail.com>.
> The "all" target is not used by
> ant's build.xml to find the tests to run.
Ok, that makes sense, committed suggested change - now I get a
successful build on java5 for that test (-f
src/tests/antunit/taskdefs/condition/hasfreespace-test.xml):
Total time: 0 seconds
D:\eclipse\workspace\ant-core-trunk>ant -f src\tests\antunit\taskdefs\condition\
hasfreespace-test.xml
Buildfile: src\tests\antunit\taskdefs\condition\hasfreespace-test.xml
all:
[au:antunit] Build File: D:\eclipse\workspace\ant-core-trunk\src\tests\antunit\t
askdefs\condition\hasfreespace-test.xml
[au:antunit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.031 sec
[au:antunit] Target: test-enough-space-human took 0 sec
[au:antunit] Target: test-not-enough-space took 0 sec
[au:antunit] Target: test-not-enough-space-human took 0 sec
[au:antunit] Target: test-enough-space took 0 sec
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: svn commit: r486570 - /ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
Posted by Peter Reilly <pe...@gmail.com>.
The "all" target is not used by
ant's build.xml to find the tests to run.
Peter
On 12/13/06, Kevin Jackson <fo...@gmail.com> wrote:
> Hi Peter,
>
> > You should apply the "if" to the test target
> > and not the all target.
>
> But I want to skip the entire test if java6 isn't available as none of
> the targets can be run without java6, or do you mean just in case
> someone tries to run an individual test?
>
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: svn commit: r486570 - /ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
Posted by Kevin Jackson <fo...@gmail.com>.
Hi Peter,
> You should apply the "if" to the test target
> and not the all target.
But I want to skip the entire test if java6 isn't available as none of
the targets can be run without java6, or do you mean just in case
someone tries to run an individual test?
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: svn commit: r486570 - /ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
Posted by Peter Reilly <pe...@gmail.com>.
You should apply the "if" to the test target
and not the all target.
i.e.:
<target name="test-not-enough-space-human" if="jdk.available">
Peter
On 12/13/06, kevj@apache.org <ke...@apache.org> wrote:
> Author: kevj
> Date: Wed Dec 13 01:55:55 2006
> New Revision: 486570
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=486570
> Log:
> -fix hasfreespace-test to avoid problems on pre jdk6 vms
>
> Modified:
> ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
>
> Modified: ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml
> URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml?view=diff&rev=486570&r1=486569&r2=486570
> ==============================================================================
> --- ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml (original)
> +++ ant/core/trunk/src/tests/antunit/taskdefs/condition/hasfreespace-test.xml Wed Dec 13 01:55:55 2006
> @@ -1,6 +1,8 @@
> <?xml version="1.0"?>
> <project name="hasfreespace-test" default="all" basedir="." xmlns:au="antlib:org.apache.ant.antunit">
>
> + <available property="jdk6.available" classname="java.util.ServiceLoader"/>
> +
> <target name="test-not-enough-space-human">
> <au:assertFalse>
> <hasfreespace partition="c:" needed="1P"/>
> @@ -26,7 +28,7 @@
> </au:assertTrue>
> </target>
>
> - <target name="all">
> + <target name="all" if="jdk6.available">
> <au:antunit>
> <fileset file="${ant.file}"/>
> <au:plainlistener/>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org