Emma Code Coverage Problems

144 views
Skip to first unread message

Aaron Marquez

unread,
Jun 8, 2015, 4:31:57 PM6/8/15
to android-...@googlegroups.com

Greetings,


I am trying to enable Emma code coverage for testing using the development/testrunner/runtest.py script found in the android source. In this case, I want to run the frameworks-graphics test with coverage enabled. An error is being thrown when I try to build the framework module with Emma instrumentation enabled. These are the steps I took to try to do so:


In build/core/java_library.mk, I added these lines to enable Emma instrumentation when using make for java libraries.


LOCAL_STATIC_JAVA_LIBRARIES += emma
LOCAL_EMMA_INSTRUMENT := true

Then I entered these commands on the shell.


. ./build/envsetup.sh

lunch lunch aosp_arm-eng

make clean-framework

make framework


The output of the failed build is hosted here: http://pastebin.com/HuDytZUX


I have read the below mailing list threads regarding questions relating to enabling code coverage; however, I had no luck in getting coverage for this test. I could not follow the procedure in the second url because it uses an earlier android version (cupcake) then the one I'm trying use (5.1). If anyone was any insight on what I should do, it would be greatly appreciated.


Emma Code Coverage Issues

https://groups.google.com/forum/#!topic/android-building/oR6NwBSWadc


EMMA Code coverage and JUnit

https://groups.google.com/forum/#!searchin/android-developers/emma$20code$20coverage/android-developers/Q8-KjKVmL4U/s5ffpvszprgJ



Thank You,

Aaron Marquez

Aaron Marquez

unread,
Jul 6, 2015, 11:14:50 AM7/6/15
to android-...@googlegroups.com
Hello,

I was considering using Jacoco as an alternative for code coverage but how would I incorporate it into the make build system? If anyone has any guidance or advice regarding this subject, it would be wonderful.

Thank You,
Aaron Marquez

Alin Tiganus

unread,
Mar 18, 2016, 12:47:10 AM3/18/16
to Android Building
Any luck with getting coverage to work?
Reply all
Reply to author
Forward
0 new messages