Closed bric3 closed 2 years ago
I'd like something closer to the JavaExecSpec
, but the jmh
block is not extending it.
environment(mapOf("JAVA_HOME" to System.getenv("JAVA_HOME")))
environment("JAVA_HOME", System.getenv("JAVA_HOME"))
And I am not sure how best to proceed. Same for the tests.
Wrong branch on my side, see #212 instead.
Sometimes it is necessary to pass some environment variables to configure the JVM process (in particular when native libraries are involved). And when there's no system property equivalent, or when it's not possible to do in the benchmark setup (e.g.
LD_PRELOAD
,JAVA_LIBRARY_PATH
).Alas, JMH does not support to set environment variable on the forked process, however it will propagate the ones that it has been launched with. E.g.
This change aims at providing the ability to pass the variable to JMH so it cna be used on the JMH forked process.