Comments inclosed On Tue, Aug 18, 2009 at 9:16 PM, duykham<duyk...@gmail.com> wrote: > > Hi Brett, > > Thanks for your help. But, for me, there's something not clearly, so > that I need more supports from you. > > 1. Firstly, as you said, > > "Before doing a build, set > > export EMMA_INSTRUMENT=true" > > a. Did you mean "doing a build" is building entire source code of > Android or just re-making images?
You don't necessarily need to have EMMA_INSTRUMENT set when doing a full build, you only need to build the packages you want to measure with code coverage. For example, if you're interested in measuring the coverage of ApiDemos, I'd recommend the following exact steps # ensure emulator is NOT launched edit init.rc to add emma.jar to the BOOTCLASSPATH as described in my earlier mail make bootimage # not sure this is necessary since next step will do a full build make -j4 # to build the full system image export EMMA_INSTRUMENT=true" make emma # builds the emma jar itself mmm development/samples/ApiDemos emulator -sdcard <path to sdcard> adb sync # just to be safe > > b. And, when we re-make images, do we need to make both bootimage and > system image or just do with bootimage? You only need to rebuild bootimage if you've changed init.rx > > c. And, after that, do we need to sync new images with the emulator? I > mean, run the command: "adb sync". or something like that? Yes > > 2. Second, if I set EMMA_INSTRUMENT=true before making images or > building from source code, I always got the error with > com.android.dx.cf.code.SimException:, which is exactly mentioned in > here: http://code.google.com/p/android/issues/detail?id=3080. I think this error only occurs when trying to build a package with emma instrumentation, which includes a static library that has not gone through emma instrumentation. If you try to make the static library first with emma instrument on, that might help get around the problem. ie export EMMA_INSTRUMENT = true make <name of static library> mmm <path to package> > > So that, i can not run the EMMA coverage after that. > > Do you have any solutions for this? Your help will be very appreciated > for me! > > Thanks and best regards, > > Duykham > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---