You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Manish Marathe <mu...@gmail.com> on 2005/11/15 01:34:22 UTC

running tests for ant 1.6.4

Hello All,

Thanks in advance.

I was building ant version 1.6.4. It built perfect. Although while running
the junit tests that come with the distrition, I am getting errors.
Following are some:

Errors with JarTest tests, so I just excluded in the build.xml, although the
errors keep repeating for successive tests.
<exclude name="${ant.package}/taskdefs/JarTest.java"/>

Next one was ANTLRTest.java and then it was DonetTest.java
<exclude name="${ant.package}/taskdefs/optional/ANTLRTest.java"/>
<exclude name="${ant.package}/taskdefs/optional/DotnetTest.java"/>

I believe I am missing something which is dependent on each other. By the
way I did successful install of ant 1.6.4 earlier. I am building ant on
RedHat 4 and installed using "sh build.sh install"

Thanks

Manish Marathe
--
SpikeSource, Inc.
http://developer.spikesource.com

Re: running tests for ant 1.6.4

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Manish Marathe wrote:

>
> I followed the exact steps as you suggested. I am attaching stack
> trace of the tests which have failed. Some have failed because of
> missing .NET apps. I don't know what that means..
>
> Let me know your suggestion.
>
Hello Manish,

in the CVS HEAD version the DOT NET are prevented from running by
default in the category "TestsThatFail".
in Ant 1.6.4 the DOTNET tests run by default, without checking whether
the dotnet tools are in the path. Strange.

Concerning ClasspathUtilsTest [2],

Peter Reilly wrote in the changelog of ClassPathUtilsTest.java :

with the bugzilla change 30161 [3] it is not necessary to place
 Path.systemClasspath in the antclassloader
Doing so causes resources to appear twice

I do not know the cause of what is happening there with ClassPathUtils.
It looks like you do have the same resource available twice.

I wonder whether I did not do this before running my tests :

rm $ANT_HOME/lib/ant*jar

like that :

set ANT_HOME=whereever I want ant installed
rm -rf bootstrap
rm $ANT_HOME/lib/ant*jar
./build.sh -D"test.haltonfailure=false" install-lite test



Cheers,

Antoine

[1]
http://cvs.apache.org/viewcvs.cgi/ant/build.xml?rev=1.392.2.44&view=markup
[2]
http://cvs.apache.org/viewcvs.cgi/ant/src/testcases/org/apache/tools/ant/util/ClasspathUtilsTest.java?rev=1.1&view=log
[3] http://issues.apache.org/bugzilla/show_bug.cgi?id=30161

excerpt from your build log

------------------------------------------------------------------------

    [junit] Testcase: testOnlyOneInstance(org.apache.tools.ant.util.ClasspathUtilsTest):        FAILED
    [junit] Should be only one and not 2  jar:file:/home/oss/.ant/lib/ant.jar!/org/apache/tools/ant/taskdefs/defaults.properties jar:file:/opt/cm-cvsroot/latest/comps/ant/src/bootstrap/lib/ant.jar!/org/apache/tools/ant/taskdefs/defaults.properties
    [junit] junit.framework.AssertionFailedError: Should be only one and not 2  jar:file:/home/oss/.ant/lib/ant.jar!/org/apache/tools/ant/taskdefs/defaults.properties jar:file:/opt/cm-cvsroot/latest/comps/ant/src/bootstrap/lib/ant.jar!/org/apache/tools/ant/taskdefs/defaults.properties
    [junit]     at junit.framework.Assert.fail(Assert.java:47)
    [junit]     at junit.framework.Assert.assertTrue(Assert.java:20)
    [junit]     at org.apache.tools.ant.util.ClasspathUtilsTest.testOnlyOneInstance(ClasspathUtilsTest.java:64)



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: running tests for ant 1.6.4

Posted by Manish Marathe <mu...@gmail.com>.
On 11/15/05, Manish Marathe <mu...@gmail.com> wrote:
>
> On 11/15/05, Antoine Levy-Lambert <an...@gmx.de> wrote:
> >
> > Hello Manish,
> > when I built ant 1.6.4 all these tests passed.
> > JarTest should definitively pass.
> > Can you show the stack trace ?
> > The problem might be, that the tests might have run against the already
> > installed version of ant ?
> >
> > When I do a build, I do it this way.
> >
> > set ANT_HOME=whereever I want ant installed
> > rm -rf bootstrap
> > ./build.sh -D"test.haltonfailure=false" install-lite test
> >
> > (install-lite is like install, just you do not generate the javadoc).
> > When you do it this way, ant gets installed before you run the tests so
> > you are really running the tests against what you have built.
> > I think someone filed a bug rep in bugzilla to ask that we improve our
> > build.sh or our build.xml to make sure that the tests run against the
> > newly built classes or jars even if you did not install them.
> >
>
Hello Antoine,

I followed the exact steps as you suggested. I am attaching stack trace of
the tests which have failed. Some have failed because of missing .NET apps.
I don't know what that means..

Let me know your suggestion.

Thanks

-Manish
SpikeSource, Inc.
http://developer.spikesource.com

Re: running tests for ant 1.6.4

Posted by Manish Marathe <mu...@gmail.com>.
On 11/15/05, Antoine Levy-Lambert <an...@gmx.de> wrote:
>
> Hello Manish,
> when I built ant 1.6.4 all these tests passed.
> JarTest should definitively pass.
> Can you show the stack trace ?
> The problem might be, that the tests might have run against the already
> installed version of ant ?
>
> When I do a build, I do it this way.
>
> set ANT_HOME=whereever I want ant installed
> rm -rf bootstrap
> ./build.sh -D"test.haltonfailure=false" install-lite test
>
> (install-lite is like install, just you do not generate the javadoc).
> When you do it this way, ant gets installed before you run the tests so
> you are really running the tests against what you have built.
> I think someone filed a bug rep in bugzilla to ask that we improve our
> build.sh or our build.xml to make sure that the tests run against the
> newly built classes or jars even if you did not install them.
>
>
Thanks Antoine, will try that and let you know !!


--
SpikeSource, Inc.
http://developer.spikesource.com

Re: running tests for ant 1.6.4

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Manish,
when I built ant 1.6.4 all these tests passed.
JarTest should definitively pass.
Can you show the stack trace ?
The problem might be, that the tests might have run against the already
installed version of ant ?

When I do a build, I do it this way.

set ANT_HOME=whereever I want ant installed
rm -rf bootstrap
./build.sh -D"test.haltonfailure=false" install-lite test

(install-lite is like install, just you do not generate the javadoc).
When you do it this way, ant gets installed before you run the tests so
you are really running the tests against what you have built.
I think someone filed a bug rep in bugzilla to ask that we improve our
build.sh or our build.xml to make sure that the tests run against the
newly built classes or jars even if you did not install them.

Cheers,

Antoine


Manish Marathe wrote:

>Hello All,
>
>Thanks in advance.
>
>I was building ant version 1.6.4. It built perfect. Although while running
>the junit tests that come with the distrition, I am getting errors.
>Following are some:
>
>Errors with JarTest tests, so I just excluded in the build.xml, although the
>errors keep repeating for successive tests.
><exclude name="${ant.package}/taskdefs/JarTest.java"/>
>
>Next one was ANTLRTest.java and then it was DonetTest.java
><exclude name="${ant.package}/taskdefs/optional/ANTLRTest.java"/>
><exclude name="${ant.package}/taskdefs/optional/DotnetTest.java"/>
>
>I believe I am missing something which is dependent on each other. By the
>way I did successful install of ant 1.6.4 earlier. I am building ant on
>RedHat 4 and installed using "sh build.sh install"
>
>Thanks
>
>Manish Marathe
>--
>SpikeSource, Inc.
>http://developer.spikesource.com
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org