Test failed while building gradle from sources because of JAVA_TOOL_OPTIONS defined

When I build gradle from sources, test DefaultExecHandleSpec fails because I have defined the environment variable JAVA_TOOL_OPTIONS.

The jvm always outputs “Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8” on stderr when that environment variable is defined, leading to this failed test.

Since this is a known behavior of the java program, I guess the test (or gradle ? or spock ?) should be prepared to this : maybe it should either discard any line from standard error having this text (but what about localized java command ?) or it should arrange to remove JAVA_TOOL_OPTIONS prior to calling the artifact under test.

Should I raise an issue ?

Marc

Yes, please. The test should depend on JAVA_TOOL_OPTIONS env variable.

A typo in my previous post: this test should not depend on any env variable.