ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick (Gus) Heck" <patrick.h...@olin.edu>
Subject problem with testcase for AntTest
Date Mon, 13 May 2002 16:31:06 GMT
 From trying to track down the source of this problem a bit, it appears 
that the call to Path.systemClasspath.toString() in the testRefId isn't 
returning the same thing as ${java.class.path} in the test xml file: 
src/etc/testcases/taskdefs/ant.xml. specifically, all the elements of 
java.class.path seem to be getting the parent dir of the xml file 
prepended to them.

A previously checked out copy (just before the 1.5 beta release) still 
runs the tests fine under my current setup so I think it is in the code 
not my setup, though I have noticed that there is one more test in the 
current copy of AntTest than the old copy.

This is what I did:

I checked out a copy of ant 1.5 (checkout -r ANT_15_BRANCH) then did the 
following:

 >cd jakarta-ant
 >build.sh
 -- happy build output omitted --

Then to make sure the copy I checked out was working I did:

 >build.sh test

This is what I got (starting at the failed test) :

Testsuite: org.apache.tools.ant.taskdefs.AntTest
Tests run: 17, Failures: 1, Errors: 0, Time elapsed: 5.731 sec

Testcase: testRefId(org.apache.tools.ant.taskdefs.AntTest):     FAILED
expected:<bootstrap/lib/optional.jar:bootstrap/lib/ant.jar:lib/xercesImpl.jar:lib/xmlParserAPIs.jar:lib/optional/junit.jar:/usr/java/j2sdk1.4.0/lib/tools.jar>

but 
was:</home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/bootstrap/lib/optional.jar:/home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/bootstrap/lib/ant.jar:/home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/lib/xercesImpl.jar:/home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/lib/xmlParserAPIs.jar:/home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/lib/optional/junit.jar:/usr/java/j2sdk1.4.0/lib/tools.jar>
junit.framework.AssertionFailedError: 
expected:<bootstrap/lib/optional.jar:bootstrap/lib/ant.jar:lib/xercesImpl.jar:lib/xmlParserAPIs.jar:lib/optional/junit.jar:/usr/java/j2sdk1.4.0/lib/tools.jar>

but 
was:</home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/bootstrap/lib/optional.jar:/home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/bootstrap/lib/ant.jar:/home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/lib/xercesImpl.jar:/home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/lib/xmlParserAPIs.jar:/home/gus/projects/jakarta-ant/src/etc/testcases/taskdefs/lib/optional/junit.jar:/usr/java/j2sdk1.4.0/lib/tools.jar>
        at junit.framework.Assert.fail(Assert.java:51)
        at junit.framework.Assert.failNotEquals(Assert.java:234)
        at junit.framework.Assert.assertEquals(Assert.java:68)
        at junit.framework.Assert.assertEquals(Assert.java:75)
        at 
org.apache.tools.ant.taskdefs.AntTest$PropertyChecker.targetStarted(AntTest.java:438)
        at org.apache.tools.ant.Project.fireTargetStarted(Project.java:1792)
        at org.apache.tools.ant.Target.performTasks(Target.java:333)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1216)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:369)
        at org.apache.tools.ant.Task.perform(Task.java:313)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1216)
        at 
org.apache.tools.ant.BuildFileTest.executeTarget(BuildFileTest.java:254)
        at org.apache.tools.ant.taskdefs.AntTest.testRefId(AntTest.java:262)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at junit.framework.TestCase.runTest(TestCase.java:166)
        at junit.framework.TestCase.runBare(TestCase.java:140)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:131)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:797)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:544)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:520)
        at org.apache.tools.ant.Task.perform(Task.java:313)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1216)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1160)
        at org.apache.tools.ant.Main.runBuild(Main.java:605)
        at org.apache.tools.ant.Main.start(Main.java:195)
        at org.apache.tools.ant.Main.main(Main.java:234)



BUILD FAILED
/home/gus/projects/jakarta-ant/build.xml:1149: Test 
org.apache.tools.ant.taskdefs.AntTest failed




--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message