You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Peter Schröder <ps...@blau.de> on 2010/03/25 17:42:41 UTC

enhancing the test task

hi,

the buildr docs show an example for enhancing the test-task:

test do
  fail 'More than 3 tests failed!' if test.failed_tests.size > 3
end

i did not manage to get that one working and i did not see any spec for the usage. does it really work?

kind regards,
peter

AW: enhancing the test task

Posted by Peter Schröder <ps...@blau.de>.
buildr deserves it! great community, instant fixes - the build system that doesn't suck ;)

________________________________________
Von: Alex Boisvert [alex.boisvert@gmail.com]
Gesendet: Freitag, 26. März 2010 18:02
An: users@buildr.apache.org
Betreff: Re: enhancing the test task

Both fixed.   Thanks again for being our most avid documentation debugger.

alex


On Fri, Mar 26, 2010 at 12:07 AM, Peter Schröder <ps...@blau.de> wrote:

> i am still working through all the examples in the docs from time to time
> to provide some decent examples for our inhouse developers (as can be seen
> here http://github.com/phoet/buildr-examples)
> and yesterday i was looking into the testing chapter...
>
> there is no usecase that i can think of for this enhancement. i would
> always prefer putting @Ignore annotations directly in my tests instead of
> changing the build!
>
> btw: "But=" in line 3 of the chapter
>
> kind regards,
> peter
>
>
> Am 25.03.2010 um 23:43 schrieb Alex Boisvert:
>
> > Yeah, sometimes our documentation is a little, ahem, forward-looking.  It
> > definitely doesn't work on trunk.
> >
> > I don't know if this worked before and I'm not sure it's a good use-case.
> > I'm guessing that if you tried it, it's because there was some appeal to
> > it?  I'd be curious to understand your motivation.
> >
> > In any case, the behavior is under-spec'ed right now.   It's not clear if
> > the block should be called if there's a test failure.   And if it should
> be
> > called if test=all is passed.
> >
> > I'm open to any interpretation on this.  We'll update the doc once we
> reach
> > a consensus.
> >
> > alex
> >
> > On Thu, Mar 25, 2010 at 9:42 AM, Peter Schröder <ps...@blau.de> wrote:
> >
> >> hi,
> >>
> >> the buildr docs show an example for enhancing the test-task:
> >>
> >> test do
> >> fail 'More than 3 tests failed!' if test.failed_tests.size > 3
> >> end
> >>
> >> i did not manage to get that one working and i did not see any spec for
> the
> >> usage. does it really work?
> >>
> >> kind regards,
> >> peter
>
>

Re: enhancing the test task

Posted by Alex Boisvert <al...@gmail.com>.
Both fixed.   Thanks again for being our most avid documentation debugger.

alex


On Fri, Mar 26, 2010 at 12:07 AM, Peter Schröder <ps...@blau.de> wrote:

> i am still working through all the examples in the docs from time to time
> to provide some decent examples for our inhouse developers (as can be seen
> here http://github.com/phoet/buildr-examples)
> and yesterday i was looking into the testing chapter...
>
> there is no usecase that i can think of for this enhancement. i would
> always prefer putting @Ignore annotations directly in my tests instead of
> changing the build!
>
> btw: "But=" in line 3 of the chapter
>
> kind regards,
> peter
>
>
> Am 25.03.2010 um 23:43 schrieb Alex Boisvert:
>
> > Yeah, sometimes our documentation is a little, ahem, forward-looking.  It
> > definitely doesn't work on trunk.
> >
> > I don't know if this worked before and I'm not sure it's a good use-case.
> > I'm guessing that if you tried it, it's because there was some appeal to
> > it?  I'd be curious to understand your motivation.
> >
> > In any case, the behavior is under-spec'ed right now.   It's not clear if
> > the block should be called if there's a test failure.   And if it should
> be
> > called if test=all is passed.
> >
> > I'm open to any interpretation on this.  We'll update the doc once we
> reach
> > a consensus.
> >
> > alex
> >
> > On Thu, Mar 25, 2010 at 9:42 AM, Peter Schröder <ps...@blau.de> wrote:
> >
> >> hi,
> >>
> >> the buildr docs show an example for enhancing the test-task:
> >>
> >> test do
> >> fail 'More than 3 tests failed!' if test.failed_tests.size > 3
> >> end
> >>
> >> i did not manage to get that one working and i did not see any spec for
> the
> >> usage. does it really work?
> >>
> >> kind regards,
> >> peter
>
>

Re: enhancing the test task

Posted by Peter Schröder <ps...@blau.de>.
i am still working through all the examples in the docs from time to time to provide some decent examples for our inhouse developers (as can be seen here http://github.com/phoet/buildr-examples)
and yesterday i was looking into the testing chapter...

there is no usecase that i can think of for this enhancement. i would always prefer putting @Ignore annotations directly in my tests instead of changing the build!

btw: "But=" in line 3 of the chapter

kind regards,
peter


Am 25.03.2010 um 23:43 schrieb Alex Boisvert:

> Yeah, sometimes our documentation is a little, ahem, forward-looking.  It
> definitely doesn't work on trunk.
> 
> I don't know if this worked before and I'm not sure it's a good use-case.
> I'm guessing that if you tried it, it's because there was some appeal to
> it?  I'd be curious to understand your motivation.
> 
> In any case, the behavior is under-spec'ed right now.   It's not clear if
> the block should be called if there's a test failure.   And if it should be
> called if test=all is passed.
> 
> I'm open to any interpretation on this.  We'll update the doc once we reach
> a consensus.
> 
> alex
> 
> On Thu, Mar 25, 2010 at 9:42 AM, Peter Schröder <ps...@blau.de> wrote:
> 
>> hi,
>> 
>> the buildr docs show an example for enhancing the test-task:
>> 
>> test do
>> fail 'More than 3 tests failed!' if test.failed_tests.size > 3
>> end
>> 
>> i did not manage to get that one working and i did not see any spec for the
>> usage. does it really work?
>> 
>> kind regards,
>> peter


Re: enhancing the test task

Posted by Daniel Spiewak <dj...@gmail.com>.
I think in this case, the block will be called by Rake since we're doing a
task.enhance.  I'm pretty sure that enhance blocks are called *after* the
main task (and any existing enhancements) have successfully executed.  Thus,
this block would only be called if the tests passed.

Daniel

On Thu, Mar 25, 2010 at 4:43 PM, Alex Boisvert <al...@gmail.com>wrote:

> Yeah, sometimes our documentation is a little, ahem, forward-looking.  It
> definitely doesn't work on trunk.
>
> I don't know if this worked before and I'm not sure it's a good use-case.
> I'm guessing that if you tried it, it's because there was some appeal to
> it?  I'd be curious to understand your motivation.
>
> In any case, the behavior is under-spec'ed right now.   It's not clear if
> the block should be called if there's a test failure.   And if it should be
> called if test=all is passed.
>
> I'm open to any interpretation on this.  We'll update the doc once we reach
> a consensus.
>
> alex
>
> On Thu, Mar 25, 2010 at 9:42 AM, Peter Schröder <ps...@blau.de> wrote:
>
> > hi,
> >
> > the buildr docs show an example for enhancing the test-task:
> >
> > test do
> >  fail 'More than 3 tests failed!' if test.failed_tests.size > 3
> > end
> >
> > i did not manage to get that one working and i did not see any spec for
> the
> > usage. does it really work?
> >
> > kind regards,
> > peter
>

Re: enhancing the test task

Posted by Alex Boisvert <al...@gmail.com>.
Yeah, sometimes our documentation is a little, ahem, forward-looking.  It
definitely doesn't work on trunk.

I don't know if this worked before and I'm not sure it's a good use-case.
I'm guessing that if you tried it, it's because there was some appeal to
it?  I'd be curious to understand your motivation.

In any case, the behavior is under-spec'ed right now.   It's not clear if
the block should be called if there's a test failure.   And if it should be
called if test=all is passed.

I'm open to any interpretation on this.  We'll update the doc once we reach
a consensus.

alex

On Thu, Mar 25, 2010 at 9:42 AM, Peter Schröder <ps...@blau.de> wrote:

> hi,
>
> the buildr docs show an example for enhancing the test-task:
>
> test do
>  fail 'More than 3 tests failed!' if test.failed_tests.size > 3
> end
>
> i did not manage to get that one working and i did not see any spec for the
> usage. does it really work?
>
> kind regards,
> peter