Matei David
05/23/2025, 6:25 PMGradleRunner.create().withTestKitDir(myTestHomeDir).withPluginClasspath().withProjectDir(myProjectDir).withDebug(false)
.
(Initially I had tried withDebug(true)
to get coverage, but cc-enabled tests fail due to the presence of the Jacoco agent, so I gave up on coverage for cc tests.)
Still, with the settings above, my cc tests pass on Windows and fail on Linux with a message that:
"Class com.sun.jna.NativeLibrary: external process started /sbin/ldconfig -p...
Starting an external process /sbin/ldconfig -p during configuration time is unsupported"
I tried to identify the culprit that might execute ldconfig, and I suspect it is caused by the recently added Nebula Info.
Still, I am puzzled why Gradle complains about the ldconfig call only on Linux and not on Windows.
I'm not too familiar with Neblua, but I suspect this OS-specific branching might occur elsewhere.
Does anyone have any suggestions how to fix my cc-enabled tests on Linux without ditching Nebula Info?
Is there any guideline specifically about Gradle cc and Jna/ldconfig on Linux in particular?
EDIT: I found the Linux call here: https://github.com/nebula-plugins/gradle-info-plugin/blob/main/src/main/groovy/nebula/plugin/info/ci/POSIXUtil.groovy#L23
It seems ridiculous this is being done only to get the hostname...
This is resolved, I might raise it with Nebula Info, not a Gradle issue. I'll leave this here for reference.