You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Greg Lucas <gr...@gmail.com> on 2009/11/18 18:02:11 UTC

Running tests for a specific project

I'm running buildr 1.3.5 (on jruby) and trying to tests a specific  
project. I can specify a pattern (package or class) and things work fine.

I was thinking I could also run all tests for a single project using e.g.

$buildr myproject:test

or just

$cd myproject
$buildr test

but either way it runs all the tests for all the upstream dependencies as  
well. Is that expected?

Thanks,
-- 
Greg Lucas

Re: Running tests for a specific project

Posted by Rhett Sutphin <rh...@detailedbalance.net>.
Hi Alex,

On Nov 18, 2009, at 11:16 AM, Alex Boisvert wrote:

> On Wed, Nov 18, 2009 at 9:08 AM, Alex Boisvert <alex.boisvert@gmail.com 
> >wrote:
>
>> On Wed, Nov 18, 2009 at 9:02 AM, Greg Lucas <gr...@gmail.com>  
>> wrote:
>>
>>> I'm running buildr 1.3.5 (on jruby) and trying to tests a specific
>>> project. I can specify a pattern (package or class) and things  
>>> work fine.
>>>
>>> I was thinking I could also run all tests for a single project  
>>> using e.g.
>>>
>>> $buildr myproject:test
>>>
>>> or just
>>>
>>> $cd myproject
>>> $buildr test
>>>
>>> but either way it runs all the tests for all the upstream  
>>> dependencies as
>>> well. Is that expected?
>>>
>>
>> Only if the upstream dependencies have changed.
>>
>> If they haven't, then there either an issue with the build/ 
>> buildfile itself
>> or a bug in Buildr.  Details would help narrow it down.
>>
>>
> Would people be interested in an option to test only the specified  
> test
> targets?
>
> e.g. buildr test=:only project:foo:test
>
> Not sure about the syntax yet but that's the idea.

There was some previous discussion about this: http://markmail.org/search/#query 
:%20Suppressing%20retesting%20when%20the%20buildfile%20changes+page:1+mid:yazlwofpeshafjme+state:results

I'm in favor of it.

Rhett

Re: Running tests for a specific project

Posted by Greg Lucas <gr...@gmail.com>.
> I have something working but realized that "buildr test=only" is  
> incompatible with "test=all" at the syntax level.
>
> Any better suggestion?   We could always do "buildr test=all,only" but  
> it looks funny.


Maybe test=project? Or something a bit more general like test=scope?

-- 
Greg Lucas

AW: bad error-reporting

Posted by Peter Schröder <ps...@blau.de>.
thx for the example, we will try that approach.
________________________________________
Von: Alex Boisvert [alex.boisvert@gmail.com]
Gesendet: Sonntag, 22. November 2009 17:42
An: users@buildr.apache.org
Betreff: Re: bad error-reporting

On Sat, Nov 21, 2009 at 5:55 AM, Peter Schröder <ps...@blau.de> wrote:

> that's great!
>
> for additional information:
>
> we have lots of projects that we migrate to buildr and on that way we
> restructure them to have subprojects and to match the apache folder
> standard.
>
> so there is often the case that some sub projects misses a folder and so
> our standard tasks fail.
>
> it would be of great value if the failed task would print out its current
> scope so that one knows where to look for the missing source, or even that
> the problem is that there is something missing for packaging or compiling or
> whatever task is on its way...
>

As I explained, we now fail-fast so you'll get an error during project
definition, not later when the tasks are executing.

Adding a more explicit error about missing directories is difficult to do in
the general case because we opted for both "conventions over configurations"
and for automatically detecting what kind of project you're buildling (java,
groovy, scala, ...).   Without any indication, we don't really know what to
build so we can't provide meaningful error report.

I think your best bet is to write a simple extensions that checks for what
you're expecting, e.g.,

module JavaProject
  include Buildr::Extension

  before_define do |project|
    fail "Missing sources under src/main/java" unless File.exist?
project.path_to("src/main/java")
  end

  after_define do |project|
    project.package :jar if project.packages.size == 0
  end
end

and in your Buildfile,

define 'foo' do
  extend JavaProject
  ...
end

alex

Re: bad error-reporting

Posted by Alex Boisvert <al...@gmail.com>.
On Sat, Nov 21, 2009 at 5:55 AM, Peter Schröder <ps...@blau.de> wrote:

> that's great!
>
> for additional information:
>
> we have lots of projects that we migrate to buildr and on that way we
> restructure them to have subprojects and to match the apache folder
> standard.
>
> so there is often the case that some sub projects misses a folder and so
> our standard tasks fail.
>
> it would be of great value if the failed task would print out its current
> scope so that one knows where to look for the missing source, or even that
> the problem is that there is something missing for packaging or compiling or
> whatever task is on its way...
>

As I explained, we now fail-fast so you'll get an error during project
definition, not later when the tasks are executing.

Adding a more explicit error about missing directories is difficult to do in
the general case because we opted for both "conventions over configurations"
and for automatically detecting what kind of project you're buildling (java,
groovy, scala, ...).   Without any indication, we don't really know what to
build so we can't provide meaningful error report.

I think your best bet is to write a simple extensions that checks for what
you're expecting, e.g.,

module JavaProject
  include Buildr::Extension

  before_define do |project|
    fail "Missing sources under src/main/java" unless File.exist?
project.path_to("src/main/java")
  end

  after_define do |project|
    project.package :jar if project.packages.size == 0
  end
end

and in your Buildfile,

define 'foo' do
  extend JavaProject
  ...
end

alex

AW: bad error-reporting

Posted by Peter Schröder <ps...@blau.de>.
that's great! 

for additional information:

we have lots of projects that we migrate to buildr and on that way we restructure them to have subprojects and to match the apache folder standard.

so there is often the case that some sub projects misses a folder and so our standard tasks fail.

it would be of great value if the failed task would print out its current scope so that one knows where to look for the missing source, or even that the problem is that there is something missing for packaging or compiling or whatever task is on its way...

________________________________________
Von: Alex Boisvert [alex.boisvert@gmail.com]
Gesendet: Samstag, 21. November 2009 03:17
An: users@buildr.apache.org
Betreff: Re: bad error-reporting

The first issue here was that because 'src/main/java' didn't exist, then the
Java compiler wasn't being selected.  As a result, compile.target was nil
and since nil.to_s is equal to '' (empty string) and you would get strange
exceptions about task ''.

If you had added compile.using :javac, you would not have gotten any
exception -- although it would have resulted in a .jar file without any
.classes.

In any case, I've added a few checks so we now fail-fast if there's any nil
values being passed into package.with() or include().

alex

On Thu, Nov 19, 2009 at 11:43 AM, Peter Schröder <ps...@blau.de> wrote:

> simple as that:
>
> define "testo", :version=>'1.0.0' do
>  # run buildr package
>  package(:jar).with(compile.target)
> end
>
> ________________________________________
> Von: Alex Boisvert [alex.boisvert@gmail.com]
> Gesendet: Donnerstag, 19. November 2009 18:23
> An: users@buildr.apache.org
> Betreff: Re: bad error-reporting
>
> Can you provide an example project that illustrates this?  I can dig into
> it.
>
> alex
>
> On Thu, Nov 19, 2009 at 1:57 AM, Peter Schröder <Peter.Schroeder@blau.de
> >wrote:
>
> > hi,
> >
> > we are migrating our projects to buildr and there is often the case that
> we
> > miss to copy some folder or something is empty.
> >
> > in this case rake aborts with:
> >
> > Don't know how to build task ''
> >
> > this error message is not very helpfull especially for the newbees
> around.
> >
> > i played around a little bit with the messages produced in rake to at
> least
> > specify the current scope of the failure, but i was not very pleased with
> my
> > approach.
> >
> > is there some better way to provide a detailed error-message?
> >
> > i would expect somthing like:
> >
> > - Could not build forder 'src/test/java' because it does not exist -
> >
> > kind regards,
> > peter
>

Re: bad error-reporting

Posted by Alex Boisvert <al...@gmail.com>.
The first issue here was that because 'src/main/java' didn't exist, then the
Java compiler wasn't being selected.  As a result, compile.target was nil
and since nil.to_s is equal to '' (empty string) and you would get strange
exceptions about task ''.

If you had added compile.using :javac, you would not have gotten any
exception -- although it would have resulted in a .jar file without any
.classes.

In any case, I've added a few checks so we now fail-fast if there's any nil
values being passed into package.with() or include().

alex

On Thu, Nov 19, 2009 at 11:43 AM, Peter Schröder <ps...@blau.de> wrote:

> simple as that:
>
> define "testo", :version=>'1.0.0' do
>  # run buildr package
>  package(:jar).with(compile.target)
> end
>
> ________________________________________
> Von: Alex Boisvert [alex.boisvert@gmail.com]
> Gesendet: Donnerstag, 19. November 2009 18:23
> An: users@buildr.apache.org
> Betreff: Re: bad error-reporting
>
> Can you provide an example project that illustrates this?  I can dig into
> it.
>
> alex
>
> On Thu, Nov 19, 2009 at 1:57 AM, Peter Schröder <Peter.Schroeder@blau.de
> >wrote:
>
> > hi,
> >
> > we are migrating our projects to buildr and there is often the case that
> we
> > miss to copy some folder or something is empty.
> >
> > in this case rake aborts with:
> >
> > Don't know how to build task ''
> >
> > this error message is not very helpfull especially for the newbees
> around.
> >
> > i played around a little bit with the messages produced in rake to at
> least
> > specify the current scope of the failure, but i was not very pleased with
> my
> > approach.
> >
> > is there some better way to provide a detailed error-message?
> >
> > i would expect somthing like:
> >
> > - Could not build forder 'src/test/java' because it does not exist -
> >
> > kind regards,
> > peter
>

AW: bad error-reporting

Posted by Peter Schröder <ps...@blau.de>.
simple as that:

define "testo", :version=>'1.0.0' do
  # run buildr package
  package(:jar).with(compile.target)
end

________________________________________
Von: Alex Boisvert [alex.boisvert@gmail.com]
Gesendet: Donnerstag, 19. November 2009 18:23
An: users@buildr.apache.org
Betreff: Re: bad error-reporting

Can you provide an example project that illustrates this?  I can dig into
it.

alex

On Thu, Nov 19, 2009 at 1:57 AM, Peter Schröder <Pe...@blau.de>wrote:

> hi,
>
> we are migrating our projects to buildr and there is often the case that we
> miss to copy some folder or something is empty.
>
> in this case rake aborts with:
>
> Don't know how to build task ''
>
> this error message is not very helpfull especially for the newbees around.
>
> i played around a little bit with the messages produced in rake to at least
> specify the current scope of the failure, but i was not very pleased with my
> approach.
>
> is there some better way to provide a detailed error-message?
>
> i would expect somthing like:
>
> - Could not build forder 'src/test/java' because it does not exist -
>
> kind regards,
> peter

Re: bad error-reporting

Posted by Alex Boisvert <al...@gmail.com>.
Can you provide an example project that illustrates this?  I can dig into
it.

alex

On Thu, Nov 19, 2009 at 1:57 AM, Peter Schröder <Pe...@blau.de>wrote:

> hi,
>
> we are migrating our projects to buildr and there is often the case that we
> miss to copy some folder or something is empty.
>
> in this case rake aborts with:
>
> Don't know how to build task ''
>
> this error message is not very helpfull especially for the newbees around.
>
> i played around a little bit with the messages produced in rake to at least
> specify the current scope of the failure, but i was not very pleased with my
> approach.
>
> is there some better way to provide a detailed error-message?
>
> i would expect somthing like:
>
> - Could not build forder 'src/test/java' because it does not exist -
>
> kind regards,
> peter

bad error-reporting

Posted by Peter Schröder <Pe...@blau.de>.
hi,

we are migrating our projects to buildr and there is often the case that we miss to copy some folder or something is empty.

in this case rake aborts with:

Don't know how to build task ''

this error message is not very helpfull especially for the newbees around.

i played around a little bit with the messages produced in rake to at least specify the current scope of the failure, but i was not very pleased with my approach.

is there some better way to provide a detailed error-message?

i would expect somthing like:

- Could not build forder 'src/test/java' because it does not exist -

kind regards,
peter

AW: problems on building buildr

Posted by Peter Schröder <ps...@blau.de>.
i didnt find this in the documentation. i just wanted to create some doc from the textile documentation and poked around a little bit.

the 'contributing' section clearly shows how to use the textile stuff, so this works fine for me.


________________________________________
Von: Alex Boisvert [alex.boisvert@gmail.com]
Gesendet: Sonntag, 22. November 2009 18:16
An: users@buildr.apache.org
Betreff: Re: problems on building buildr

Fixed in trunk.

I'm curious where you saw this command documented:

buildr -t -f buildr.buildfile package

because I couldn't find it.  (Maybe another case of documentation myopia)

As far as I know, we don't use this method of packaging anymore.   We use
Gem tasks itself to package Buildr instead of using Buildr itself.  (See
rakelib/package.rake)

alex

On Wed, Nov 18, 2009 at 11:43 PM, Peter Schröder <Pe...@blau.de>wrote:

> hi,
>
> i tried to follow the contribution-guide and then buildr buildr with
>
> $ buildr -t -f buildr.buildfile package
>
> wich failed with
>
> undefined method `write' for #<String:0x3f4de7ea>
>
> is there some gem missing?!
>
> see the attachment for trace
>
> $ jruby -v
> jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java
> HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
> $ buildr -V
> Buildr 1.4.0 (JRuby 1.4.0RC2)
>
>
>

Re: problems on building buildr

Posted by Alex Boisvert <al...@gmail.com>.
Fixed in trunk.

I'm curious where you saw this command documented:

buildr -t -f buildr.buildfile package

because I couldn't find it.  (Maybe another case of documentation myopia)

As far as I know, we don't use this method of packaging anymore.   We use
Gem tasks itself to package Buildr instead of using Buildr itself.  (See
rakelib/package.rake)

alex

On Wed, Nov 18, 2009 at 11:43 PM, Peter Schröder <Pe...@blau.de>wrote:

> hi,
>
> i tried to follow the contribution-guide and then buildr buildr with
>
> $ buildr -t -f buildr.buildfile package
>
> wich failed with
>
> undefined method `write' for #<String:0x3f4de7ea>
>
> is there some gem missing?!
>
> see the attachment for trace
>
> $ jruby -v
> jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java
> HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
> $ buildr -V
> Buildr 1.4.0 (JRuby 1.4.0RC2)
>
>
>

problems on building buildr

Posted by Peter Schröder <ps...@blau.de>.
hi,

i tried to follow the contribution-guide and then buildr buildr with

$ buildr -t -f buildr.buildfile package

wich failed with

undefined method `write' for #<String:0x3f4de7ea>

is there some gem missing?!

see the attachment for trace

$ jruby -v
jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
$ buildr -V
Buildr 1.4.0 (JRuby 1.4.0RC2)



WG: problems on building buildr

Posted by Peter Schröder <ps...@blau.de>.
hm, 

attachement seems to get lost:

WARNING:  no description specified
rm /Users/peterschroder/buildr/buildr/extra/target/buildr-extra-1.0.gem
Exception while invoking prerequisites of task <Rake::Task buildr:extra:package => [buildr:extra:build, /Users/peterschroder/buildr/buildr/extra/target/buildr-extra-1.0.gem]>
Exception while invoking prerequisites of task <Rake::Task buildr:package => [buildr:build, buildr:java:package, buildr:scala:package, buildr:extra:package]>
Buildr aborted!
undefined method `write' for #<String:0x3f4de7ea>
/Users/peterschroder/Library/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_writer.rb:170:in `close'
/Users/peterschroder/Library/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:139:in `close'
/Users/peterschroder/Library/jruby/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb:35:in `open'
/Users/peterschroder/Library/jruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:56:in `open'
/Users/peterschroder/Library/jruby-1.4.0RC2/lib/ruby/gems/1.8/gems/buildr-1.4.0-java/lib/buildr/packaging/gems.rb:62:in `create_from'
/Users/peterschroder/Library/jruby-1.4.0RC2/lib/ruby/gems/1.8/gems/buildr-1.4.0-java/lib/buildr/packaging/archive.rb:291:in `initialize'
/Users/peterschroder/Library/jruby-1.4.0RC2/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/peterschroder/Library/jruby-1.4.0RC2/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/peterschroder/Library/jruby-1.4.0RC2/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/peterschroder/Library/jruby-1.4.0RC2/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/peterschroder/Library/jruby-1.4.0RC2/lib/ruby/gems/1.8/gems/buildr-1.4.0-java/lib/buildr/core/application.rb:630:in `invoke_with_call_chain'

________________________________________
Von: Peter Schröder
Gesendet: Donnerstag, 19. November 2009 16:40
An: users@buildr.apache.org
Betreff: problems on building buildr

hi,

i tried to follow the contribution-guide and then buildr buildr with

$ buildr -t -f buildr.buildfile package

wich failed with

undefined method `write' for #<String:0x3f4de7ea>

is there some gem missing?!

see the attachment for trace

$ jruby -v
jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
$ buildr -V
Buildr 1.4.0 (JRuby 1.4.0RC2)

problems on building buildr

Posted by Peter Schröder <ps...@blau.de>.
hi,

i tried to follow the contribution-guide and then buildr buildr with

$ buildr -t -f buildr.buildfile package

wich failed with

undefined method `write' for #<String:0x3f4de7ea>

is there some gem missing?!

see the attachment for trace

$ jruby -v
jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
$ buildr -V
Buildr 1.4.0 (JRuby 1.4.0RC2)

problems on building buildr

Posted by Peter Schröder <Pe...@blau.de>.
hi,

i tried to follow the contribution-guide and then buildr buildr with

$ buildr -t -f buildr.buildfile package

wich failed with

undefined method `write' for #<String:0x3f4de7ea>

is there some gem missing?!

see the attachment for trace

$ jruby -v
jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java]
$ buildr -V
Buildr 1.4.0 (JRuby 1.4.0RC2)



Re: nice support

Posted by Alex Boisvert <al...@gmail.com>.
In my case, I'm between jobs right now so I'm happy to spend more quality
time with Buildr... and my familly of course ;)

alex

On Wed, Nov 18, 2009 at 11:15 PM, Peter Schröder <Pe...@blau.de>wrote:

> hi all,
>
> i think that the mailing list has become a great place for help and i am
> very kind of the speed that patches get applied!
>
> thank you very much!

AW: nice support

Posted by Peter Schröder <ps...@blau.de>.
hi all,

i think that the mailing list has become a great place for help and i am very kind of the speed that patches get applied!

thank you very much!

nice support

Posted by Peter Schröder <Pe...@blau.de>.
hi all,

i think that the mailing list has become a great place for help and i am very kind of the speed that patches get applied!

thank you very much!

Re: Running tests for a specific project

Posted by Alex Boisvert <al...@gmail.com>.
On Wed, Nov 18, 2009 at 10:56 AM, Alex Boisvert <al...@gmail.com>wrote:

> On Wed, Nov 18, 2009 at 9:16 AM, Alex Boisvert <al...@gmail.com>wrote:
>
>> Would people be interested in an option to test only the specified test
>> targets?
>>
>> e.g. buildr test=:only project:foo:test
>>
>> Not sure about the syntax yet but that's the idea.
>>
>
> I have something working but realized that "buildr test=only" is
> incompatible with "test=all" at the syntax level.
>
> Any better suggestion?   We could always do "buildr test=all,only" but it
> looks funny.
>

I committed what I had as-is, thinking that we're not going to need both
"all" and "only" options at once.

If somebody really needs it, let's reopen this discussion at that time.

alex

Re: Running tests for a specific project

Posted by Alex Boisvert <al...@gmail.com>.
On Wed, Nov 18, 2009 at 9:16 AM, Alex Boisvert <al...@gmail.com>wrote:

> Would people be interested in an option to test only the specified test
> targets?
>
> e.g. buildr test=:only project:foo:test
>
> Not sure about the syntax yet but that's the idea.
>

I have something working but realized that "buildr test=only" is
incompatible with "test=all" at the syntax level.

Any better suggestion?   We could always do "buildr test=all,only" but it
looks funny.

alex

Re: Running tests for a specific project

Posted by Babu Naidu <pb...@gmail.com>.
Yes, that would be nice to have feature, especially to make
modify+compile+run tests cycle efficient.

Thanks
Babu

On Wed, Nov 18, 2009 at 10:16 AM, Alex Boisvert <al...@gmail.com>wrote:

> On Wed, Nov 18, 2009 at 9:08 AM, Alex Boisvert <alex.boisvert@gmail.com
> >wrote:
>
> > On Wed, Nov 18, 2009 at 9:02 AM, Greg Lucas <gr...@gmail.com>
> wrote:
> >
> >> I'm running buildr 1.3.5 (on jruby) and trying to tests a specific
> >> project. I can specify a pattern (package or class) and things work
> fine.
> >>
> >> I was thinking I could also run all tests for a single project using
> e.g.
> >>
> >> $buildr myproject:test
> >>
> >> or just
> >>
> >> $cd myproject
> >> $buildr test
> >>
> >> but either way it runs all the tests for all the upstream dependencies
> as
> >> well. Is that expected?
> >>
> >
> > Only if the upstream dependencies have changed.
> >
> > If they haven't, then there either an issue with the build/buildfile
> itself
> > or a bug in Buildr.  Details would help narrow it down.
> >
> >
> Would people be interested in an option to test only the specified test
> targets?
>
> e.g. buildr test=:only project:foo:test
>
> Not sure about the syntax yet but that's the idea.
>
> alex
>

Re: Running tests for a specific project

Posted by Alex Boisvert <al...@gmail.com>.
On Wed, Nov 18, 2009 at 9:08 AM, Alex Boisvert <al...@gmail.com>wrote:

> On Wed, Nov 18, 2009 at 9:02 AM, Greg Lucas <gr...@gmail.com> wrote:
>
>> I'm running buildr 1.3.5 (on jruby) and trying to tests a specific
>> project. I can specify a pattern (package or class) and things work fine.
>>
>> I was thinking I could also run all tests for a single project using e.g.
>>
>> $buildr myproject:test
>>
>> or just
>>
>> $cd myproject
>> $buildr test
>>
>> but either way it runs all the tests for all the upstream dependencies as
>> well. Is that expected?
>>
>
> Only if the upstream dependencies have changed.
>
> If they haven't, then there either an issue with the build/buildfile itself
> or a bug in Buildr.  Details would help narrow it down.
>
>
Would people be interested in an option to test only the specified test
targets?

e.g. buildr test=:only project:foo:test

Not sure about the syntax yet but that's the idea.

alex

Re: Running tests for a specific project

Posted by Alex Boisvert <al...@gmail.com>.
On Wed, Nov 18, 2009 at 9:02 AM, Greg Lucas <gr...@gmail.com> wrote:

> I'm running buildr 1.3.5 (on jruby) and trying to tests a specific project.
> I can specify a pattern (package or class) and things work fine.
>
> I was thinking I could also run all tests for a single project using e.g.
>
> $buildr myproject:test
>
> or just
>
> $cd myproject
> $buildr test
>
> but either way it runs all the tests for all the upstream dependencies as
> well. Is that expected?
>

Only if the upstream dependencies have changed.

If they haven't, then there either an issue with the build/buildfile itself
or a bug in Buildr.  Details would help narrow it down.

alex

Re: Running tests for a specific project

Posted by Rhett Sutphin <rh...@detailedbalance.net>.
Hi Greg,

On Nov 18, 2009, at 11:02 AM, Greg Lucas wrote:

> I'm running buildr 1.3.5 (on jruby) and trying to tests a specific  
> project. I can specify a pattern (package or class) and things work  
> fine.
>
> I was thinking I could also run all tests for a single project using  
> e.g.
>
> $buildr myproject:test
>
> or just
>
> $cd myproject
> $buildr test
>
> but either way it runs all the tests for all the upstream  
> dependencies as well. Is that expected?

Yes, that's expected.  myproject depends on the packages from its  
upstream dependencies.  Each dependencies' package task, in turn,  
depends on the dependency's test task.

However, if you aren't making changes to the upstream dependencies (or  
your build script), it should only package each upstream dep once.

Rhett