[QUESTION] nativeTest with runtime arguments?
cmeiklejohn-dd opened this issue · comments
Christopher S. Meiklejohn commented
Describe the problem
Is there a way to configure the native tests to set system properties -- as you can do when building and running the native image?
System Info (please complete the following information):
- OS: Linux
- GraalVM Version: Oracle GraalVM 22.0
- Java Version: 17
- Plugin version: 0.9.28
To Reproduce
set runtimeArgs = "-Dproperty_name=true"
and run ./gradlew nativeTest
-- execution will invoke the test binary without the system property flag.
Vojin Jovanovic commented
Have you tried doing the following in the gradle build:
named("test") {
runtimeArgs.add("-Dproperty_name=true")
}
If this does not work, please provide relevant commands that were executed so we can inspect what happened. Even better would be to provide a reproducer as a github repo.