Ready to try my suggestion? Have you tried setting the failure properties on "batchtest" rather than the "junit" task?
On Tue, Nov 24, 2009 at 7:47 PM, Ben Cuthbert <bencuthb...@me.com> wrote: > I see. And yes it is firing them now. But I am back to the old problem that > the build does not fail when there is an error > > <target name="test-unit" if="unit.test"> > <echo message="running unit tests for project ${module}" /> > > <junit haltonfailure="no" haltonerror="no" > failureproperty="tests.failures" > errorproperty="tests.errors"> > > <classpath> > <path refid="classpath.test" /> > </classpath> > > <formatter type="brief" usefile="false" /> > > <batchtest fork="yes"> > <fileset dir="${src.tests}"> > <include name="**/*UnitTestCase.java" /> > </fileset> > </batchtest> > </junit> > > <fail if="tests.errors" message="Test errors!!!" /> > <fail if="tests.failures" message="Test failed!!!"/> > > > test-unit: > [echo] running unit tests for project server > [junit] Testsuite: > com.test.server.NetworkServerInitialisationUnitTestCase > [junit] Tests run: 4, Failures: 0, Errors: 1, Time elapsed: 0.346 sec > [junit] > [junit] Testcase: > TestTheServerIsNotConnected(com.test.server.NetworkServerInitialisationUnitTestCase): > Caused an ERROR > [junit] > > On 24 Nov 2009, at 19:40, Greg Roodt wrote: > >> Ant has resolved your variables references. >> >> Your "if" should look like this: >> <target name="test-unit" if="unit.test"> >> >> >> On Tue, Nov 24, 2009 at 7:32 PM, Ben Cuthbert <bencuthb...@me.com> wrote: >>> >>> Yes I got the following error running in debug >>> >>> test-unit: >>> Skipped because property 'true' not set. >>> >>> >>> ant build -Dunit.test=true -verbose >>> >>> What is the property true >>> >>> >>> On 24 Nov 2009, at 14:42, glenn opdycke-hansen wrote: >>> >>>> Suggest that you run in verbose mode. i suspect that the target could >>>> be >>>> the cause. >>>> -glenn >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >>> For additional commands, e-mail: user-h...@ant.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >> For additional commands, e-mail: user-h...@ant.apache.org >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org