Make runtest handle inner instrumentation class names.

Bug 7311518

Change-Id: I7c02991445a9fdd2341f54cfd49169fc4e492536
This commit is contained in:
Brett Chabot
2012-10-25 11:08:14 -07:00
parent d4dd2825b7
commit 616e8f960d
2 changed files with 5 additions and 3 deletions

View File

@@ -305,7 +305,7 @@ class AdbInterface:
command_string += " -e %s '%s'" % (key, value)
if raw_mode:
command_string += " -r"
command_string += " -w %s" % instrumentation_path
command_string += " -w '%s'" % instrumentation_path
return command_string
def _CreateTraceDir(self):

View File

@@ -253,11 +253,13 @@ class InstrumentationTestFactory(test_suite.AbstractTestFactory):
self.GetBuildPath()))
return tests
elif len(instrs) > 1:
logger.Log("Found multiple instrumentation declarations in %s/%s."
logger.Log("Found multiple instrumentation declarations in %s/%s. "
"Only using first declared." %
(self.GetBuildPath(),
android_manifest.AndroidManifest.FILENAME))
instr_name = manifest_parser.GetInstrumentationNames()[0]
# escape inner class names
instr_name = instr_name.replace('$', '\$')
pkg_name = manifest_parser.GetPackageName()
if instr_name.find(".") < 0:
instr_name = "." + instr_name