1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-10-31 07:04:17 +00:00

UiAutomatorWorkloads: Updated to use the new parameter passing functionality.

Each workload has be modfied to remove the old manual paremeter conversion
and instead to retrieve the desired type from the parameter bundle directly.
This commit is contained in:
Marc Bonnici
2017-02-09 16:49:12 +00:00
parent d10e51e30b
commit 8f1206678a
35 changed files with 43 additions and 51 deletions

View File

@@ -62,9 +62,9 @@ class Videostreaming(AndroidUiAutoBenchmark):
self.uiauto_params['tolerance'] = self.tolerance
self.uiauto_params['sampling_interval'] = self.sampling_interval
if self.video_name and self.video_name != "":
self.uiauto_params['video_name'] = self.video_name.replace(" ", "0space0") # hack to get around uiautomator limitation
self.uiauto_params['video_name'] = self.video_name
else:
self.uiauto_params['video_name'] = "abkk sathe {}".format(self.resolution).replace(" ", "0space0")
self.uiauto_params['video_name'] = "abkk sathe {}".format(self.resolution)
self.apk_file = context.resolver.get(wlauto.common.android.resources.ApkFile(self))
self.uiauto_file = context.resolver.get(wlauto.common.android.resources.JarFile(self))
self.device_uiauto_file = self.device.path.join(self.device.working_directory,

View File

@@ -60,10 +60,9 @@ public class UiAutomation extends BaseUiAutomation {
if (parameters.size() <= 0)
return;
int tolerance = Integer.parseInt(parameters.getString("tolerance"));
int samplingInterval = Integer.parseInt(parameters
.getString("sampling_interval"));
String videoName = parameters.getString("video_name").replace("0space0", " "); //Hack to get around uiautomator limitation
int tolerance = parameters.getInt("tolerance");
int samplingInterval = parameters.getInt("sampling_interval");
String videoName = parameters.getString("video_name");
UiObject search = new UiObject(new UiSelector()
.className("android.widget.ImageButton").index(0));