On Wed, Sep 7, 2011 at 6:36 AM, Peter Niederwieser <[email protected]>wrote:
>
> Brett Cave wrote:
> >
> > The only way I can get it to work currently is by doing:
> > allJvmArgs = [ "-DtargetHost=" +
> > System.getProperty("targetHost","localhost") ]
> >
>
> Very strange. Are you sure that the tests were actually run when you
> perceived these problems?
>
Yes. The reason is that I use the following snippet in a base test class:
String host = System.getProperty("targetHost");
if (host == null || "".equals(host) {
Assert.fail("targetHost not set");
}
The test fails with the assertion printed out.
Brett
>
> --
> Peter Niederwieser
> Principal Engineer, Gradleware
> http://gradleware.com
> Creator, Spock Framework
> http://spockframework.org
> Twitter: @pniederw
>
>
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/system-properties-for-a-test-task-tp4754300p4777196.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>