1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-28 05:28:42 +00:00

[framework] Undo changes to UiAutomatorGUI

Restore UiAutomatorGUI back to what it was, as we don't want to
change the existing generic code for implementing the jank test
workloads.
This commit is contained in:
Luis Machado 2024-08-28 11:05:12 +01:00
parent 94fa1be588
commit aa41d4d77d

View File

@ -504,14 +504,13 @@ class UiAutomatorGUI(object):
stages = ['setup', 'runWorkload', 'extractResults', 'teardown'] stages = ['setup', 'runWorkload', 'extractResults', 'teardown']
uiauto_runner = 'android.support.test.runner.AndroidJUnitRunner'
def __init__(self, owner, package=None, klass='UiAutomation', timeout=600): def __init__(self, owner, package=None, klass='UiAutomation', timeout=600):
self.owner = owner self.owner = owner
self.target = self.owner.target self.target = self.owner.target
self.uiauto_package = package self.uiauto_package = package
self.uiauto_class = klass self.uiauto_class = klass
self.uiauto_jank_class = klass
self.uiauto_runner = 'android.support.test.runner.AndroidJUnitRunner'
self.jank_stages = []
self.timeout = timeout self.timeout = timeout
self.logger = logging.getLogger('gui') self.logger = logging.getLogger('gui')
self.uiauto_file = None self.uiauto_file = None
@ -540,16 +539,6 @@ class UiAutomatorGUI(object):
self.commands[stage] = cmd_template.format(params, class_string, self.commands[stage] = cmd_template.format(params, class_string,
instrumentation_string) instrumentation_string)
for stage in self.jank_stages:
class_string = '{}.{}#{}'.format(self.uiauto_package,
self.uiauto_jank_class,
stage)
instrumentation_string = '{}/{}'.format(self.uiauto_package,
self.uiauto_runner)
cmd_template = 'am instrument -w -r{} -e class {} {}'
self.commands[stage] = cmd_template.format(params, class_string,
instrumentation_string)
def deploy(self): def deploy(self):
if self.target.package_is_installed(self.uiauto_package): if self.target.package_is_installed(self.uiauto_package):
self.target.uninstall_package(self.uiauto_package) self.target.uninstall_package(self.uiauto_package)
@ -589,7 +578,6 @@ class UiAutomatorGUI(object):
else: else:
self.logger.debug(result) self.logger.debug(result)
time.sleep(2) time.sleep(2)
return result
class ReventGUI(object): class ReventGUI(object):