[Fwd: Re: [groovy-user] Distinguishing Gradle test run and Eclipse test run]

View: New views
1 Messages — Rating Filter:   Alert me  

[Fwd: Re: [groovy-user] Distinguishing Gradle test run and Eclipse test run]

by Russel Winder-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hans, Adam,

I failed to include the Gradle community list with this response, hence
this email.

This way of using the options.fork method seems ugly, is it the only way
of setting a property in the forked JVM used for the JUnit run?

Thanks.


-------- Forwarded Message --------

> From: Russel Winder <russel.winder@...>
> Reply-to: user@...
> To: user@...
> Subject: Re: [groovy-user] Distinguishing Gradle test run and Eclipse
> test run
> Date: Sun, 18 Oct 2009 19:55:03 +0100
>
> On Sun, 2009-10-18 at 06:09 -0700, Peter Niederwieser wrote:
> >
> > Russel Winder-4 wrote:
> > >
> > > For Gant and Ant, the "Simply set" is easy, use the sysproperty tag in
> > > the junit task, but how to do this in Gradle?
> > >
> >
> > I haven't tried this myself, but Google says:
> >
> > test {
> >   options.fork( jvmArgs: [ "-Dfoobar=moo",  "-Dugly=duckling" ] )
> > }
>
> Peter,
>
> Thanks for making this suggestion.  I can confirm that it does work.
> However, it is a very ugly way of having to do things.  If Hans and/or
> Adam confirm that this is the only way of doing things, I think I need
> to raise a JIRA to flag that a better way of doing this is needed.
>
> Thanks again.
>
--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: russel@...
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:russel.winder@...
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder


signature.asc (204 bytes) Download Attachment