On Tue, 2010-03-02 at 08:09 +1100, Adam Murdoch wrote:
> 
> On 28/02/10 2:53 AM, Russel Winder wrote:
> > Gradle is failing to execute the Gant tests now whereas they at least
> > ran with the 20100121145940+1100 wrapper.
[ . . . ]
> 
> The classpath is being used if it gets here. GantTestCase has been 
> loaded and it's static initalizers being run. What's the assertion on 
> line 116 checking?

Of course it is.  Sorry , my fault for being silly.

I amended the code a bit to probe the issue, and now I am getting Java
insanity.  The code that fails is a Java assertion and I have surrounded
it with prints to System.err.  The code is temporarily:

       //
       for ( final String s : version ) { System.err.println ( "YYYY: "
+ s ) ; }
       System.err.println ( "\nYYYY: " + version[5] + "\n" ) ;
       //
       assert version[5] == "SNAPSHOT" ;
       //
       for ( final String s : version ) { System.err.println ( "ZZZZ: "
+ s ) ; }
       //

and Gradle reports the output as:

        YYYY: 1
        YYYY: 8
        YYYY: 0
        YYYY: beta
        YYYY: 1
        YYYY: SNAPSHOT
        
        YYYY: SNAPSHOT

So according to the output version[5] is "SNAPSHOT" and yet the
assertion fails.

There has to be something amazingly trivial I am missing here. 

Removing the assertion returns the execution to something sensible which
is good.  However, and this is probably a completely separate issue, I
am seeing:

        Caught: org.xml.sax.SAXParseException: target element appears without a 
name attribute
        org.xml.sax.SAXParseException: target element appears without a name 
attribute
                at 
org.apache.tools.ant.helper.ProjectHelper2$TargetHandler.onStartElement(ProjectHelper2.java:911)
                at groovy.util.AntBuilder.onStartTarget(AntBuilder.java:353)
                at groovy.util.AntBuilder.createNode(AntBuilder.java:331)
                at groovy.util.AntBuilder.createNode(AntBuilder.java:282)
                at groovy.util.AntBuilder.createNode(AntBuilder.java:286)
                at 
groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:103)
                at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:162)
                at 
groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
                at 
org.codehaus.gant.GantBuilder.invokeMethod(GantBuilder.java:93)
                at 
org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:135)
                at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
                at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
                at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
                at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
                at standard_input.run(standard_input:1)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at 
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
                at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
                at 
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
                at 
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
                at 
groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
                at 
groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
                at 
org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:127)
                at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
                at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
                at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
                at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
                at gant.Gant.processTargets(Gant.groovy:579)
                at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at 
org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
                at 
org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
                at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
                at gant.Gant.processArgs(Gant.groovy:540)
                at 
org.codehaus.gant.tests.GantTestCase.processCmdLineTargets(GantTestCase.java:173)
                at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at 
org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
                at 
org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
                at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
                at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
                at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
                at 
org.codehaus.gant.tests.Targets_Test.testStringParameter(Targets_Test.groovy:74)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at junit.framework.TestCase.runTest(TestCase.java:168)
                at junit.framework.TestCase.runBare(TestCase.java:134)
                at junit.framework.TestResult$1.protect(TestResult.java:110)
                at junit.framework.TestResult.runProtected(TestResult.java:128)
                at junit.framework.TestResult.run(TestResult.java:113)
                at junit.framework.TestCase.run(TestCase.java:124)
                at junit.framework.TestSuite.runTest(TestSuite.java:232)
                at junit.framework.TestSuite.run(TestSuite.java:227)
                at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
                at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
                at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422)
                at 
org.gradle.api.internal.tasks.testing.junit.AntJUnitTestClassProcessor.processTestClass(AntJUnitTestClassProcessor.java:79)
                at 
org.gradle.api.internal.tasks.testing.WorkerTestClassProcessor.processTestClass(WorkerTestClassProcessor.java:49)
                at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at 
org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:31)
                at 
org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:22)
                at 
org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
                at 
org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:59)
                at $Proxy2.processTestClass(Unknown Source)
                at 
org.gradle.api.testing.execution.fork.TestWorker.processTestClass(TestWorker.java:83)
                at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at 
org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:31)
                at 
org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:22)
                at 
org.gradle.messaging.dispatch.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:45)
                at 
org.gradle.messaging.dispatch.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:22)
                at 
org.gradle.messaging.dispatch.DiscardOnFailureDispatch.dispatch(DiscardOnFailureDispatch.java:31)
                at 
org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:194)
                at 
org.gradle.messaging.dispatch.AsyncDispatch.access$200(AsyncDispatch.java:34)
                at 
org.gradle.messaging.dispatch.AsyncDispatch$2.run(AsyncDispatch.java:84)
                at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:636)

on the terminal initiating the Gradle.  This relates to one of the test
cases, so relates to the execution of the tests, but probably should not
escape to the standard output of the Gradle execution?


-- 
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [email protected]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[email protected]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to