[GRADLE-407] Make it easier to set the system properties (and other jvmArgs) of the JVM used to run 'test' Created: 19/Feb/09  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 0.9-rc-1

Type: Improvement
Reporter: Jon Cox Assignee: Adam Murdoch
Resolution: Fixed Votes: 1


 Description   

Currently, the only way I know to specify the system properties of the JVM used in the 'test' task is:

  test {
      options.fork( jvmArgs: [ "-Dfoobar=moo",  "-Dugly=duckling" ] )
  }

That is rather ugly for something you need to do fairly often.

What about something like:

test {
     systemProperties = [  foobar : "moo",     ugly: "duckling" ]
}

Or perhaps:

test {
    jvmArgs = [   "-Dfoobar=moo" , "-Dugly=duckling" ]
}

It would also be nice if the userguide discussed system properties of the
JVM that runs test when it's discussing setting system properties for the
build's JVM; this would help to underscore the difference.



 Comments   
Comment by Adam Murdoch [ 24/Mar/10 ]

See org.gradle.api.tasks.util.JavaForkOptions for details.

Generated at Wed Jun 30 11:29:19 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.