Coverage and unbundling changes for runtest.

Stop using 'adb sync' in runtest. It was unreliable even when working
with full platform builds, and doesn't work at all for unbundled apps.
Instead, use output from build command to find produced artifacts and
use 'adb install' where possible.
However, note that this approach won't sync previously built artifacts
to device.

Also adjust to build system support for code coverage. Its no longer
required to build libcore to get code coverage.

Change-Id: I9c5d37897c9570d2d29db3ec82f5c53e60a8f485
This commit is contained in:
Brett Chabot
2012-08-31 18:39:00 -07:00
parent 341b0892b7
commit 7454171f17
5 changed files with 56 additions and 54 deletions

View File

@@ -289,25 +289,6 @@ def EnableCoverageBuild():
os.environ["EMMA_INSTRUMENT"] = "true"
def TestDeviceCoverageSupport(adb):
"""Check if device has support for generating code coverage metrics.
This tries to dump emma help information on device, a response containing
help information will indicate that emma is already on system class path.
Returns:
True if device can support code coverage. False otherwise.
"""
try:
output = adb.SendShellCommand("exec app_process / emma -h")
if output.find('emma usage:') == 0:
return True
except errors.AbortError:
pass
return False
def Run():
"""Does coverage operations based on command line args."""
# TODO: do we want to support combining coverage for a single target