Make runtest handle inner instrumentation class names.
Bug 7311518 Change-Id: I7c02991445a9fdd2341f54cfd49169fc4e492536
This commit is contained in:
@@ -305,7 +305,7 @@ class AdbInterface:
|
|||||||
command_string += " -e %s '%s'" % (key, value)
|
command_string += " -e %s '%s'" % (key, value)
|
||||||
if raw_mode:
|
if raw_mode:
|
||||||
command_string += " -r"
|
command_string += " -r"
|
||||||
command_string += " -w %s" % instrumentation_path
|
command_string += " -w '%s'" % instrumentation_path
|
||||||
return command_string
|
return command_string
|
||||||
|
|
||||||
def _CreateTraceDir(self):
|
def _CreateTraceDir(self):
|
||||||
|
|||||||
@@ -253,11 +253,13 @@ class InstrumentationTestFactory(test_suite.AbstractTestFactory):
|
|||||||
self.GetBuildPath()))
|
self.GetBuildPath()))
|
||||||
return tests
|
return tests
|
||||||
elif len(instrs) > 1:
|
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." %
|
"Only using first declared." %
|
||||||
(self.GetBuildPath(),
|
(self.GetBuildPath(),
|
||||||
android_manifest.AndroidManifest.FILENAME))
|
android_manifest.AndroidManifest.FILENAME))
|
||||||
instr_name = manifest_parser.GetInstrumentationNames()[0]
|
instr_name = manifest_parser.GetInstrumentationNames()[0]
|
||||||
|
# escape inner class names
|
||||||
|
instr_name = instr_name.replace('$', '\$')
|
||||||
pkg_name = manifest_parser.GetPackageName()
|
pkg_name = manifest_parser.GetPackageName()
|
||||||
if instr_name.find(".") < 0:
|
if instr_name.find(".") < 0:
|
||||||
instr_name = "." + instr_name
|
instr_name = "." + instr_name
|
||||||
@@ -275,7 +277,7 @@ class InstrumentationTestFactory(test_suite.AbstractTestFactory):
|
|||||||
# custom build steps
|
# custom build steps
|
||||||
if suite.GetPackageName().startswith('com.android.cts'):
|
if suite.GetPackageName().startswith('com.android.cts'):
|
||||||
suite.SetSuite('cts')
|
suite.SetSuite('cts')
|
||||||
tests.append(suite)
|
tests.append(suite)
|
||||||
return tests
|
return tests
|
||||||
|
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user