infer-plugin
infer-plugin copied to clipboard
Eradicate tests fail on Ubuntu
I'm working on Travis CI configuration for this repository (in my fork).
Environments, which would be nice to have in Travis, are Linux (Java 7&8), Mac OS (Java 7&8).
I've started with Linux Java8.
In order to build and run tests for infer-plugin
module, we need to have infer
dependency installed on build machine.
There're different ways to install infer
on Linux which are described on Getting started with Infer page.
I've tried both options (compile infer from sources and Docker way). In both cases I almost succeeded in integration.
By "almost" I mean following:
- Infer is installed on build machine
- Android dependencies as well
- plugin is building correctly
- unit tests - some tests are failing (here's the problem).
What's interesting that failing tests are all related to eradicate
.
See failing build with infer compiled from sources - https://travis-ci.org/vgaidarji/infer-plugin/builds/196092460
and failing build with infer installed via Docker - https://travis-ci.org/vgaidarji/infer-plugin/jobs/195189315.
In both cases I get :infer-plugin:test > 34 tests completed, 8 failed
. Please check logs in builds from above for the stacktrace.
I tried to analyze what's used in those tests in infer-plugin
module, and seems like the problem is somehow related to this line https://github.com/uber-common/infer-plugin/blob/master/infer-plugin/src/main/groovy/com/uber/infer/task/PrepareForInfer.groovy#L71.
If I comment this line of code and run unit tests on local machine (Mac OS, I don't have Linux), I get exactly the same 8 failing tests with the same error.
Even though, I've installed Docker on local machine and used the same steps as in Travis to reproduce the issue and issue reproduced there as well.
I'm wondering if it's a problem in Linux configuration (probably some file system related issues) or it's a bug and infer-plugin
eradicate tests fail on Linux OS in 100% of cases.
@tonycosentini Did you guys test this plugin on Linux?
I'm a little bit stuck at this moment, as I tried almost everything. Should I ignore Linux, and configure Travis integration only for Mac OS for now?
I have not tried this plugin on linux, but my guess is that infer is not respecting the .inferconfig file. Maybe there is an alternative method that actually writes the exclusions to the .inferconfig file? The failing unit tests are all about exclusion not working, via .inferconfig.
I tried to figure out what might go wrong with.inferconfig
file and exclusions inside it on Linux, and printed to logs content of .inferconfig
file for each test in this build:
{
"eradicate_whitelist": [
],
"eradicate_blacklist": [
"src",
"build/tmp/inferPrepare/generated-source"
],
"infer_whitelist": [
],
"infer_blacklist": [
"build/tmp/inferPrepare/generated-source"
]
}
When I compared the content of .inferconfig
file from Travis and the one I had on my local machine, I found that they are identical.