generate data and parse report from different machine got class not match

37 views
Skip to first unread message

yutia...@snapchat.com

unread,
Jun 19, 2017, 12:27:53 PM6/19/17
to JaCoCo and EclEmma Users
I have tested with the Jacoco a lot in the past month. Yesterday I notice there is a class do no match with execution data, I search for several discuss and also find the explanation http://www.eclemma.org/jacoco/trunk/doc/classids.html.

In my case I run try to using different machine to run the test and generate report by Jenkins, I think they share the same config but I will check. So even though the classes files are from different machines I thought they are same. Anyone has any idea of the config I could check on the machines other than:
Different compiler vendor (e.g. Eclipse vs. Oracle JDK)
Different compiler versions
Different compiler settings (e.g. debug vs. non-debug)

Evgeny Mandrikov

unread,
Jun 19, 2017, 12:49:28 PM6/19/17
to JaCoCo and EclEmma Users, yutia...@snapchat.com
There are known cases when class-files are different between executions of exact same compiler in exact same configuration. Hence the only thing that you must guarantee and hence check is not a configuration, but exactly the fact that class-files are byte-to-byte identical on both machines.

yutia...@snapchat.com

unread,
Jun 19, 2017, 1:04:36 PM6/19/17
to JaCoCo and EclEmma Users, yutia...@snapchat.com
Hi Evgeny,

Thanks for the quick reply, I will try it.

Another thing I notice that the instrument seems sometime will change the classes file in a wired way, after the off line instrument, a lot of code become /* compiled code */. And the data from this class can't be correctly generated, do you have any idea on it?

Yutian Song

Evgeny Mandrikov

unread,
Jun 19, 2017, 1:24:09 PM6/19/17
to JaCoCo and EclEmma Users, yutia...@snapchat.com
Of course offline instrumentation does change classes and it does this almost in exact the same way as during on-the-fly instrumentation. In later case you just don't see this change as it happens on-the-fly. Nothin weird here. I have no idea what you mean by "/* compiled code */". The only wild guess is that your decompiler is not capable to decompile such classes and so shows this, but that's completely different story.

Now the most important thing: in case of offline instrumentation you must run generation of report against original non-instrumented class-files, otherwise you'll be getting exact same error about missmatch of classes.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages