I’m currently working on a library of common robot utilities to be reused from year to year, and I would like to add unit testing to it. Some of the classes that I’m testing calls methods in WPILib which access native code (
DriverStation.reportError() more specifically). While these unit tests run fine without any problems when I do a
./gradlew test on my local machine, they fail when building in Travis CI, with the error
java.io.IOException: wpiHaljni could not be loaded from path or an embedded resource. attempted to load for platform /linux/x86-64/ at edu.wpi.first.wpiutil.RuntimeLoader.loadLibrary(RuntimeLoader.java:79) at edu.wpi.first.hal.JNIWrapper.<clinit>(JNIWrapper.java:25) etc......
(The full build log can be found here)
Is there a way I can make the unit tests work on Travis?