1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-30 17:50:46 +00:00

UIBenchJankTests:modification to support Android 12/14 versions

dex file search is modified. It collects all the available methods under the package name. Tested with other benchmarks (geekbench,pcmark,jankbench in Android 12) as well.
This commit is contained in:
Elif Topuz 2023-12-06 14:14:58 +00:00 committed by Marc Bonnici
parent d7d1deedda
commit 5a1eb4a778

View File

@ -231,12 +231,15 @@ class ApkInfo(object):
parser = etree.XMLParser(encoding='utf-8', recover=True)
xml_tree = etree.parse(StringIO(dump), parser)
package = next((i for i in xml_tree.iter('package')
if i.attrib['name'] == self.package), None)
package = []
for i in xml_tree.iter('package'):
if i.attrib['name'] == self.package:
package.append(i)
self._methods = [(meth.attrib['name'], klass.attrib['name'])
for klass in package.iter('class')
for meth in klass.iter('method')] if package else []
for elem in package:
self._methods.extend([(meth.attrib['name'], klass.attrib['name'])
for klass in elem.iter('class')
for meth in klass.iter('method')])
return self._methods
def _run(self, command):