1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 10:51:13 +01:00

Workload: Updated to use a ParameterDict

In order to pass arguments to the instrumented test via the command line
they need to be encoded, this commit utilises a ParamDict to ensure
parameters are encoded correctly before passing them as arguments.
This commit is contained in:
Marc Bonnici 2017-06-27 10:01:32 +01:00
parent 85218a10d2
commit 1b93a4162b

View File

@ -22,6 +22,7 @@ from wa.framework.plugin import TargetedPlugin
from wa.framework.resource import (ApkFile, JarFile, ReventFile, NO_ONE,
Executable, File)
from wa.framework.exception import WorkloadError
from wa.utils.types import ParameterDict
from wa.utils.revent import ReventRecorder
from wa.utils.exec_control import once
@ -261,7 +262,7 @@ class UiAutomatorGUI(object):
self.logger = logging.getLogger('gui')
self.uiauto_file = None
self.commands = {}
self.uiauto_params = {}
self.uiauto_params = ParameterDict()
def init_resources(self, resolver):
self.uiauto_file = resolver.get(ApkFile(self.owner, uiauto=True))
@ -273,7 +274,7 @@ class UiAutomatorGUI(object):
params_dict = self.uiauto_params
params_dict['workdir'] = self.target.working_directory
params = ''
for k, v in self.uiauto_params.iteritems():
for k, v in params_dict.iter_encoded_items():
params += ' -e {} {}'.format(k, v)
for stage in self.stages: