Ant-contrib-test has been started failing on Gump sometime between
2007-08-21T00:00 and 2007-08-22T00L:00 (I believe Pacific DT, but
could be wrong) with the following test failures:
run-test:
[junit] Testsuite: net.sf.antcontrib.design.VerifyDesignTest
[junit] Tests run: 41, Failures: 0, Errors: 0, Time elapsed:
15.651 sec
[junit]
[junit] Testsuite: net.sf.antcontrib.logic.AntCallBackTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed:
0.886 sec
[junit]
[junit] Testsuite: net.sf.antcontrib.logic.AssertTest
[junit] Tests run: 8, Failures: 0, Errors: 2, Time elapsed:
0.317 sec
[junit]
[junit] Testcase: test4(net.sf.antcontrib.logic.AssertTest):
Caused an ERROR
[junit] both arg1 and arg2 are required in greater than
[junit] /srv/gump/public/workspace/ant-contrib/test/resources/
logic/asserttest.xml:34: both arg1 and arg2 are required in greater than
[junit] at net.sf.antcontrib.logic.condition.IsGreaterThan.eval
(IsGreaterThan.java:64)
[junit] at net.sf.antcontrib.logic.Assert.execute(Assert.java:102)
[junit] at net.sf.antcontrib.logic.AssertTest.test4
(AssertTest.java:57)
[junit]
[junit]
[junit] Testcase: test5(net.sf.antcontrib.logic.AssertTest):
Caused an ERROR
[junit] both arg1 and arg2 are required in less than
[junit] /srv/gump/public/workspace/ant-contrib/test/resources/
logic/asserttest.xml:42: both arg1 and arg2 are required in less than
[junit] at net.sf.antcontrib.logic.condition.IsLessThan.eval
(IsLessThan.java:64)
[junit] at net.sf.antcontrib.logic.Assert.execute(Assert.java:102)
[junit] at net.sf.antcontrib.logic.AssertTest.test5
(AssertTest.java:61)
[junit]
[junit]
[junit] Test net.sf.antcontrib.logic.AssertTest FAILED
[junit] Testsuite: net.sf.antcontrib.logic.ForTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed:
0.076 sec
...
[junit]
[junit] Testsuite: net.sf.antcontrib.process.LimitTest
[junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed:
2.072 sec
[junit]
[junit] Testcase: test2(net.sf.antcontrib.process.LimitTest):
Caused an ERROR
[junit] both arg1 and arg2 are required in less than
[junit] /srv/gump/public/workspace/ant-contrib/test/resources/
logic/limittest.xml:32: both arg1 and arg2 are required in less than
[junit] at net.sf.antcontrib.logic.condition.IsLessThan.eval
(IsLessThan.java:64)
[junit] at net.sf.antcontrib.logic.Assert.execute(Assert.java:102)
[junit] at net.sf.antcontrib.process.LimitTest.test2
(LimitTest.java:35)
[junit]
[junit]
[junit] Test net.sf.antcontrib.process.LimitTest FAILED
[junit] Testsuite: net.sf.antcontrib.property.PathToFileSetTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed:
0.112 sec
...
and continues in that state see http://vmgump.apache.org/gump/public/
ant-contrib/ant-contrib-test/index.html.
There were no changes to ant-contrib during that time, but there were
many changes to Ant. I went through and ran the ant-contrib-tests
against various revisions and it appears that ant-contrib would pass
with rev 568091 and failed with 568096 and every later release I tried.
To run the test, check ant-contrib out from SVN:
$ svn co https://ant-contrib.svn.sourceforge.net/svnroot/ant-contrib/
ant-contrib/trunk ant-contrib
$ cd ant-contrib
'
'
' will run ant-contrib against Ant 1.6.5, but will also download
dependencies. Should pass.
$ mvn package
'
' will pass or fail depending on whether a pre or post rev 568096
ant is on the path
'
$ ant -Dno-ivy=true clean gump-safe-test -lib ~/.m2/repository/junit/
junit/3.8.1/junit-3.8.1.jar
The offending rev does deal with Introspection and seems that it
could interfere with proper initialization of tasks, but I don't see
any obvious error in the patch. It doesn't have a related bug
report, so I don't know what it is trying to fix.
Index: src/main/org/apache/tools/ant/IntrospectionHelper.java
===================================================================
--- src/main/org/apache/tools/ant/IntrospectionHelper.java (revision
568091)
+++ src/main/org/apache/tools/ant/IntrospectionHelper.java (revision
568096)
@@ -943,6 +943,17 @@
final Class reflectedArg = PRIMITIVE_TYPE_MAP.containsKey(arg)
? (Class) PRIMITIVE_TYPE_MAP.get(arg) : arg;
+ // Object.class - it gets handled differently by
AttributeSetter
+ if (java.lang.Object.class == reflectedArg) {
+ return new AttributeSetter(m, arg) {
+ public void set(Project p, Object parent, String value)
+ throws InvocationTargetException,
+ IllegalAccessException {
+ throw new BuildException(
+ "Internal ant problem - this should not get
called");
+ }
+ };
+ }
// simplest case - setAttribute expects String
if (java.lang.String.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]