You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Martin Grotzke <ma...@javakaffee.de> on 2009/02/18 21:34:43 UTC

Re: Suppressing retesting when the buildfile changes and/or only running tests for one project

On Wed, 2009-02-18 at 11:27 -0800, Alex Boisvert wrote:
> I believe it's an indirect dependency.
> 
> Let's say I have 2 modules "foo" and "bar".
> 
> bar:test depends on foo:package (say for a jar), but foo:package depends on
> foo:test.
Ok, makes sense.

> 
> So I think the option would be to break the dependency between package and
> test so that you can manually specify only the tests you want to run.
Is this possible somehow for this scenario?
Or is it possible, to specify that projects that the current one
dependends on shall not be built?

Cheers,
Martin


> 
> alex
> 
> 
> On Wed, Feb 18, 2009 at 1:56 AM, Martin Grotzke <
> martin.grotzke@javakaffee.de> wrote:
> 
> > Hi,
> >
> > On Tue, 2009-02-17 at 18:51 -0600, Rhett Sutphin wrote:
> > [snip]
> > > Another solution to that problem would be to have an option to only
> > > run the tests for a single module -- sort of like test:pattern, except
> > > that the constraint would be the module.  This would help with another
> > > minor issue I've noticed: when you specify a pattern, all the tests in
> > > all the modules that match that pattern are run, even if you invoke
> > > test (or integration) from a submodule.
> > I would also expect that, when running tests from within a specific
> > (sub-)module, only tests of this module are executed. Even if other
> > modules depend on the current one, I would not expect that tests of the
> > dependent module are run.
> >
> > What is the reason that tests of all modules are run?
> >
> > Cheers,
> > Martin
> >
> >
> > > Pattern execution appears to
> > > ignore the successful test check, too.  The case where this has been a
> > > problem for me is running integration tests.  I have several
> > > integration tests with "activity" in the filename.  I also have a
> > > large number of unit tests with activity in their filenames.  So if I
> > > want to run just the integration tests for "activity," I have to wait
> > > for several dozen unit tests, across several other modules, to complete.
> > >
> > > The latter issue is less of a problem than the former, but I mention
> > > it since they have a possible common solution.  Is there an existing
> > > solution for any of these?
> > >
> > > Thanks,
> > > Rhett
> > >
> > >
> >

Re: Suppressing retesting when the buildfile changes and/or only running tests for one project

Posted by Martin Grotzke <ma...@javakaffee.de>.
On Wed, 2009-02-18 at 15:18 -0800, Alex Boisvert wrote:
> On Wed, Feb 18, 2009 at 12:34 PM, Martin Grotzke <
> martin.grotzke@javakaffee.de> wrote:
> 
> > On Wed, 2009-02-18 at 11:27 -0800, Alex Boisvert wrote:
> > > I believe it's an indirect dependency.
> > >
> > > Let's say I have 2 modules "foo" and "bar".
> > >
> > > bar:test depends on foo:package (say for a jar), but foo:package depends
> > on
> > > foo:test.
> > Ok, makes sense.
> >
> > >
> > > So I think the option would be to break the dependency between package
> > and
> > > test so that you can manually specify only the tests you want to run.
> > Is this possible somehow for this scenario?
> > Or is it possible, to specify that projects that the current one
> > dependends on shall not be built?
> 
> 
> It's possible with some coding, not possible as-is.
> 
> I was discussing this with Assaf who happens to be sitting next to me and
> our main concern is giving an option that effectively disables a lot of
> "magic" in Buidlr.  The potential for shooting oneself in the foot is
> considerable given that many don't necessarily understand all the
> implications of transitive dependencies.
> 
> If you've changed your Buildfile and added a dependency that hasn't been
> built yet, and then run buildr --without-transitive-dependencies and the
> build breaks, it's not clear whether most people will immediately understand
> what happened or spend the next 45 minutes figuring out why buildr works
> sometimes but not always.
I agree, if building/testing of other modules/project does only occur if
anything had changed therein this is totally ok.

Cheers,
Martin

> 
> alex

Re: Suppressing retesting when the buildfile changes and/or only running tests for one project

Posted by Alex Boisvert <bo...@intalio.com>.
On Wed, Feb 18, 2009 at 12:34 PM, Martin Grotzke <
martin.grotzke@javakaffee.de> wrote:

> On Wed, 2009-02-18 at 11:27 -0800, Alex Boisvert wrote:
> > I believe it's an indirect dependency.
> >
> > Let's say I have 2 modules "foo" and "bar".
> >
> > bar:test depends on foo:package (say for a jar), but foo:package depends
> on
> > foo:test.
> Ok, makes sense.
>
> >
> > So I think the option would be to break the dependency between package
> and
> > test so that you can manually specify only the tests you want to run.
> Is this possible somehow for this scenario?
> Or is it possible, to specify that projects that the current one
> dependends on shall not be built?


It's possible with some coding, not possible as-is.

I was discussing this with Assaf who happens to be sitting next to me and
our main concern is giving an option that effectively disables a lot of
"magic" in Buidlr.  The potential for shooting oneself in the foot is
considerable given that many don't necessarily understand all the
implications of transitive dependencies.

If you've changed your Buildfile and added a dependency that hasn't been
built yet, and then run buildr --without-transitive-dependencies and the
build breaks, it's not clear whether most people will immediately understand
what happened or spend the next 45 minutes figuring out why buildr works
sometimes but not always.

alex