Merge "Make runtest handle inner instrumentation class names."

This commit is contained in:
Brett Chabot
2012-10-26 16:51:18 -07:00
committed by Android (Google) Code Review
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
@@ -275,7 +277,7 @@ class InstrumentationTestFactory(test_suite.AbstractTestFactory):
# custom build steps
if suite.GetPackageName().startswith('com.android.cts'):
suite.SetSuite('cts')
tests.append(suite)
tests.append(suite)
return tests
except: