How to pass JVM args to child processes?

351 views
Skip to first unread message

Magnus Granander

unread,
Nov 13, 2016, 4:05:54 PM11/13/16
to PIT Users
Hi!

I'm currently working on a project that need to send environment args to the running process to work. As it is now, PIT will not work out of the box. I don't think I'm the only one out there that have this issue.

The documentation states this clearly:

"
  • mainProcessJvmArgs - JVM arguments to be used when launching the main PIT process; make a note that PIT itself launches another Java processes for mutation testing execution and usually jvmArgs should be used to for example increase maximum memory size (since 0.33.0 - see #7);
"


Is there some way to pass the args to the actual running process and not just the main PIT process?

Thanks!

//Magnus

Stefan

unread,
Nov 13, 2016, 4:49:53 PM11/13/16
to pitu...@googlegroups.com

Hi Magnus,


took me a moment to figure out that you're using the gradle plugin. mainProcessJvmArgs is not a regular Pitest argument but supported by the gradle plugin only.

Nevertheless have you tried jvmArgs which is a regular Pitest parameter? jvmArgs can be used to specify jvm flags as well as environment variables using -Dsome.key=ABC syntax. The arguments passed to jvmArgs will be passed to the child processes running the tests - at least this is how maven and ant plugins work. But as far as I can tell reading the gradle examples in the gradle documentation this should work with gradle plugin, too.


Regards
Stefan
--
You received this message because you are subscribed to the Google Groups "PIT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pitusers+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages