You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Kirk Lund <kl...@pivotal.io> on 2016/05/17 20:51:32 UTC

-Dtest.single= geode-core:test no longer works

Specifying -Dtest.single now always fails no matter which test (UnitTest)
is specified. The integrationTest and distributedTest tasks still work with
.single. Only test (UnitTest) is effected.

It fails in :buildSrc:test despite specifying geode-core:test so I'm
guessing it was the addition of buildSrc that broke it...

<kl...@pdx2-office-dhcp32>/Users/klund/dev/gemfire/open [687]$ ./gradlew
-Dtest.single=StringUtilsJUnitTest geode-core:test

:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
:buildSrc:testClasses UP-TO-DATE
:buildSrc:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> Could not find matching test for pattern: StringUtilsJUnitTest

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.

BUILD FAILED

Total time: 0.782 secs

Re: -Dtest.single= geode-core:test no longer works

Posted by Kirk Lund <kl...@apache.org>.
It used to work both ways. The integrationTest and distributedTest targets
still work both ways. I've only ever used the syntax with the ordering of
-D before module:target because that's what is documented on the gradle
website:

45.13.4. Single test execution via System Properties
https://docs.gradle.org/current/userguide/java_plugin.html#N158BD

I guess it's good that there's *some* way to make it work but I'd feel a
lot better about this if it still worked consistently both ways for all
three testing targets.

1) Matches the syntax described in 45.13.4 (only two work):
./gradlew -DintegrationTest.single=xxxx yyyy:integrationTest
./gradlew -DdistributedTest.single=xxxx yyyy:distributedTest
./gradlew -Dtest.single=xxxx yyyy:test <-- used to work but now fails

2) Flipped around from syntax in 45.13.4 (all three work):
./gradlew yyyy:integrationTest -DintegrationTest.single=xxxx
./gradlew yyyy:distributedTest -DdistributedTest.single=xxxx
./gradlew yyyy:test -Dtest.single=xxxx

I would think that most people are going to expect the syntax from #1
should work and that this would be the first syntax most developers are
going to try to use. I've looked through all of the gradle files but I
can't see what would've broken #1 just for "test".

-Kirk

On Tue, May 17, 2016 at 2:13 PM, Dan Smith <ds...@pivotal.io> wrote:

> I thought the correct syntax was more like below, where you prefix the
> target with geode-core, or geode-lucene, etc.
>
> ./gradlew geode-core:test -Dtest.single=StringUtilsJUnitTest
>
> For me, this works. If I leave off the geode-core: part I get a failure
> from every other subproject (geode-core, geode-assembly,...) no matter
> which test target I run.
>
> -Dan
>
> On Tue, May 17, 2016 at 1:51 PM, Kirk Lund <kl...@pivotal.io> wrote:
>
> > Specifying -Dtest.single now always fails no matter which test (UnitTest)
> > is specified. The integrationTest and distributedTest tasks still work
> with
> > .single. Only test (UnitTest) is effected.
> >
> > It fails in :buildSrc:test despite specifying geode-core:test so I'm
> > guessing it was the addition of buildSrc that broke it...
> >
> > <kl...@pdx2-office-dhcp32>/Users/klund/dev/gemfire/open [687]$ ./gradlew
> > -Dtest.single=StringUtilsJUnitTest geode-core:test
> >
> > :buildSrc:compileJava UP-TO-DATE
> > :buildSrc:compileGroovy UP-TO-DATE
> > :buildSrc:processResources UP-TO-DATE
> > :buildSrc:classes UP-TO-DATE
> > :buildSrc:jar UP-TO-DATE
> > :buildSrc:assemble UP-TO-DATE
> > :buildSrc:compileTestJava UP-TO-DATE
> > :buildSrc:compileTestGroovy UP-TO-DATE
> > :buildSrc:processTestResources UP-TO-DATE
> > :buildSrc:testClasses UP-TO-DATE
> > :buildSrc:test FAILED
> >
> > FAILURE: Build failed with an exception.
> >
> > * What went wrong:
> > Execution failed for task ':test'.
> > > Could not find matching test for pattern: StringUtilsJUnitTest
> >
> > * Try:
> > Run with --stacktrace option to get the stack trace. Run with --info or
> > --debug option to get more log output.
> >
> > BUILD FAILED
> >
> > Total time: 0.782 secs
> >
>

Re: -Dtest.single= geode-core:test no longer works

Posted by Dan Smith <ds...@pivotal.io>.
I thought the correct syntax was more like below, where you prefix the
target with geode-core, or geode-lucene, etc.

./gradlew geode-core:test -Dtest.single=StringUtilsJUnitTest

For me, this works. If I leave off the geode-core: part I get a failure
from every other subproject (geode-core, geode-assembly,...) no matter
which test target I run.

-Dan

On Tue, May 17, 2016 at 1:51 PM, Kirk Lund <kl...@pivotal.io> wrote:

> Specifying -Dtest.single now always fails no matter which test (UnitTest)
> is specified. The integrationTest and distributedTest tasks still work with
> .single. Only test (UnitTest) is effected.
>
> It fails in :buildSrc:test despite specifying geode-core:test so I'm
> guessing it was the addition of buildSrc that broke it...
>
> <kl...@pdx2-office-dhcp32>/Users/klund/dev/gemfire/open [687]$ ./gradlew
> -Dtest.single=StringUtilsJUnitTest geode-core:test
>
> :buildSrc:compileJava UP-TO-DATE
> :buildSrc:compileGroovy UP-TO-DATE
> :buildSrc:processResources UP-TO-DATE
> :buildSrc:classes UP-TO-DATE
> :buildSrc:jar UP-TO-DATE
> :buildSrc:assemble UP-TO-DATE
> :buildSrc:compileTestJava UP-TO-DATE
> :buildSrc:compileTestGroovy UP-TO-DATE
> :buildSrc:processTestResources UP-TO-DATE
> :buildSrc:testClasses UP-TO-DATE
> :buildSrc:test FAILED
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':test'.
> > Could not find matching test for pattern: StringUtilsJUnitTest
>
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or
> --debug option to get more log output.
>
> BUILD FAILED
>
> Total time: 0.782 secs
>