mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
Workload: Moved uiauto command initialization to setup
In order to be able to pass the package name of the app under test to the instrumented test, the generation of the uiautomator commands needed to be postponed until after the apk resolution had been performed.
This commit is contained in:
parent
d6f18466c9
commit
0317604481
@ -191,7 +191,6 @@ class ApkUIWorkload(ApkWorkload):
|
||||
def init_resources(self, context):
|
||||
super(ApkUIWorkload, self).init_resources(context)
|
||||
self.gui.init_resources(context.resolver)
|
||||
self.gui.init_commands()
|
||||
|
||||
def initialize(self, context):
|
||||
super(ApkUIWorkload, self).initialize(context)
|
||||
@ -227,6 +226,11 @@ class ApkUiautoWorkload(ApkUIWorkload):
|
||||
super(ApkUiautoWorkload, self).__init__(target, **kwargs)
|
||||
self.gui = UiAutomatorGUI(self)
|
||||
|
||||
def setup(self, context):
|
||||
self.gui.uiauto_params['package_name'] = self.apk.apk_info.package
|
||||
self.gui.init_commands()
|
||||
super(ApkUiautoWorkload, self).setup(context)
|
||||
|
||||
|
||||
class ReventWorkload(ApkUIWorkload):
|
||||
|
||||
@ -396,9 +400,6 @@ class ReventGUI(object):
|
||||
def remove(self):
|
||||
self.revent_recorder.remove()
|
||||
|
||||
def init_commands(self):
|
||||
pass
|
||||
|
||||
def _check_revent_files(self):
|
||||
if not self.revent_run_file:
|
||||
# pylint: disable=too-few-format-args
|
||||
|
Loading…
x
Reference in New Issue
Block a user