1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00
Commit Graph

843 Commits

Author SHA1 Message Date
Marc Bonnici
50236b0661 Device: Updated to set and retrieve binary data from sysfiles
`set_sysfile_values` now accepts a `^` symbol prefixed to the
file path to indicated that the value should be written as binary data.
To accommodate this an extra `binary` flag has been added to  the `set_sysfile_value`and `get_sysfile_value` methods to write and retrieve the binary data respectively.
2017-04-06 15:59:01 +01:00
Sascha Bischoff
4abbe7602a Extend device with sleep functionality
This changeset adds the ability to sleep on the device via a
device.sleep() method. This invokes sleep on the target device. This
is useful for situations where the passage of time on the target
device does not match that of the host, e.g., gem5.

This changeset also updates a number of workloads to use this new
sleep method.
2017-03-02 14:22:05 +00:00
Sascha Bischoff
441ecfa98c Remove stale browser-specific commands from audio workload
In this changeset we remove some left over browser specific commands
which are no longer required as part of the audio workload.
2017-03-02 10:40:11 +00:00
Sergei Trofimov
7130b3a4ab Removing browser launch from audio and video
For historical reasons audio and video workloads were launching the
browser as part of their setup. This is no longer necessary. Not only
that, since on recent devices the default Android browser is missing,
this causes problems with the workloads. This commit removes the browser
launch.
2017-03-02 10:29:00 +00:00
setrofim
510abf4666 Merge pull request #359 from jimboatarm/fps-override
Allow user to override the method of collecting FPS data
2017-02-24 16:33:31 +00:00
Michael McGeagh
70b265dd34 fps: Added parameter to override FPS collection method
In Android M and above, there is a new method of collecting fps
statistics, using gfxinfo rather than SurfaceFlinger, but the
SF method is still available however.
This parameter lets the user decide whether to always use SF,
or to allow the instrument to pick the best method based on
Android version it detects.
2017-02-24 16:22:16 +00:00
Michael McGeagh
c4025cad66 Changed ActionLogger class to use nano timestamps. This is because fps instrument collects data in ns as well so is possible to match the two 2017-02-24 16:11:35 +00:00
setrofim
38b368eec2 Merge pull request #358 from marcbonnici/uiautomator
UXPerfUiAutomation and AppShare Workload Updated
2017-02-23 08:44:11 +00:00
Marc Bonnici
2e97bcce70 Appshare: Fixed typo 2017-02-22 16:25:59 +00:00
Marc Bonnici
9b13f65895 AppShare: Added check to see if additional back press is required.
On some devices after signing into skype, the back button press only
hides the keyboard and a second is required to return to the previous
app.
2017-02-22 16:25:55 +00:00
Marc Bonnici
78c1a80a51 Appshare: Updated to work with new sharing selector name.
On nexus 10 the app share selector has a new name, this commit
checks for either and uses the appropriate one.
2017-02-22 16:22:55 +00:00
Marc Bonnici
7f85da6633 AppShare: Updated to use new method of uiautomator parameter passing. 2017-02-22 16:22:55 +00:00
Marc Bonnici
f76d9f9a1f Appshare: Updated to use new methods in UxPerf.
The appshare workload has been updated to use the new getter/setter
methods added to UXPerf rather than accessing protect variables.
2017-02-22 16:21:37 +00:00
Marc Bonnici
6ffed382cf UxPerfUiAutomation: Added setWorkloadParameters and getPackageID.
To work around appshare requiring access to protected variables of a workload,
a `setWorkloadParameters` method has been added to manually supply a parameter
bundle, and a `getPackageID` method to retrieve a workloads package ID.
2017-02-22 16:21:10 +00:00
Sergei Trofimov
6e7087ee88 resource: remote resource resolution fixes
- "remote" getter priority reduced to be below "environment" so that
  resouces placed into "~/.workload_automation/dependencies" by the user
  take priority over those pulled from remote locations.
- "filer" getter now uses a cache location for the resource rather than
  downloading to the local resource location.
2017-02-21 16:35:16 +00:00
Marc Bonnici
8f1206678a 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.
2017-02-20 16:44:24 +00:00
Marc Bonnici
d10e51e30b UiAutomator: Updated to decode provided parameters from ParameterDict
To prevent parameters having to be converted individually for each worload
the getParams() function has been overridden to perform the required type and
url decoding on the passed parameter bundle before passing the correctly typed
bundle to the workloads.
2017-02-20 16:44:24 +00:00
Marc Bonnici
bd0a6ac3c8 UiAutomatorWorkload: Changed to use a ParameterDict
Due to the limitations of UiAutomator, parameters are not allowed to contain
certain characters including spaces and newlines when passed on the command line.

The python UiAutomatorWorkload baseclasse has been updated to use a
ParameterDict when storing workload parameters.
2017-02-20 16:44:24 +00:00
Marc Bonnici
9ba30c27df WA Types: Added 'ParameterDict' type.
A new 'ParameterDict' has been added that automatically encodes and
decodes values when they are store in a dictionary. The dictionary uses 2 characters
prefixed to each value to store the original type information, e.g. 'fl' -> list of
floats, before being passed through a url encoder. The reverse process happens on retrieval.
To access the encoded values an `iterEncodedItems` and `getEncodedValue` methods have been added.

The appropriate unit tests have also been added.
2017-02-20 16:44:24 +00:00
Marc Bonnici
8f40e6aa40 PEP8 / Pylint Fixes 2017-02-20 16:44:24 +00:00
Marc Bonnici
8c9ae6db53 AndroidWorkload: Split up setup_workload_apk method.
Split up `setup_workload_apk` method into smaller methods to improve readability.
2017-02-20 16:44:24 +00:00
Scott Jackson
cfa1827445 Removing surplus spaces that were added with previous commit 2017-02-20 14:43:01 +00:00
Scott Jackson
821cbaff4e Removed surplus back command that was causing AppShare workload to fail 2017-02-20 12:00:49 +00:00
Scott Jackson
6f67f00834 Added functions to work with the latest supported APK, to handle the pop up message looking to prompt the user to update and to handle the issue where the save/insert new slide button is not seen when running in maximum window on certain devices. 2017-02-17 15:16:41 +00:00
Sergei Trofimov
40db6a9933 meizumx64: always unrooted
This implements a workaround for the Meizu MX6. "su" in the rooted
version is broken from WA's perspective so all devices should be
considered unrooted.
2017-02-16 13:25:58 +00:00
setrofim
543228f7c3 Merge pull request #352 from marcbonnici/staleclasses
UiAutomator: Removed stale class files.
2017-02-10 08:15:07 +00:00
setrofim
58b97305d5 Merge pull request #350 from jimboatarm/skype-interface
Skype: implement ApplaunchInterface
2017-02-07 13:46:27 +00:00
setrofim
0246302814 Merge pull request #348 from jimboatarm/googleplaybooks-interface
Googleplaybooks: implement ApplaunchInterface
2017-02-07 13:44:15 +00:00
setrofim
0aee99a79c Merge pull request #347 from jimboatarm/youtube-interface
Youtube: implement ApplaunchInterface
2017-02-07 13:43:29 +00:00
setrofim
5012ab5f1b Merge pull request #346 from jimboatarm/googlephotos-interface
Googlephotos: implement ApplaunchInterface
2017-02-07 13:42:42 +00:00
jummp01
cd05c36250 Skype: implement ApplaunchInterface
Adapts skype workload to support applaunch workload by implementing
the required methods of the interface.

Tested on Huawei Mate8 and Samsung S7.
2017-02-07 10:45:29 +00:00
jummp01
b169b45e57 Applaunch: Update package to measured workload pkg.
Application launch workload runs the package of the workload which is being
instrumented. Fps instrumentation requires the package name and hence the
package name is changed to the workload package name during initialization.

Tested on Huawei Mate8 with fps instrumentation ON.
2017-02-06 17:01:09 +00:00
jummp01
1ebe56ca76 Googlephotos: implement ApplaunchInterface
Adapt googlephotos to support applaunch workload by implementing the methods
required by the interface.

Tested on Huawei Mate8 and Samsung S7.
2017-02-05 12:28:37 +00:00
jummp01
79f58e74b9 Googleplaybooks: implement ApplaunchInterface
Adapt googleplaybooks to support applaunch workload by implementing the methods
required by the interface.

Tested on Huawei Mate8 and Samsung S7.
2017-02-05 12:18:31 +00:00
jummp01
7fe699eb41 Youtube: implement ApplaunchInterface
Adapt youtube to support applaunch workload by implementing the required methods of the interface.

Tested on Huwaei Mate8 and Samsung S7.
2017-02-05 11:52:20 +00:00
Marc Bonnici
2bd77f0833 UiAutomator: Removed unnecessary class files.
Removed stale classes from the repository.
2017-02-03 17:14:33 +00:00
Marc Bonnici
7b7eb05e7f AdobeReader: Updated workload to work with latest version.
The 'My Documents' element that the workload used to check for completed
setup has been removed in the latest version, now checks for the
text itself which is also present in previous versions.
2017-02-03 15:42:53 +00:00
jummp01
75b56e462c Adobereader: implement ApplaunchInterface
Adapts adobereader to support uxperfapplaunch workload by implementing the required methods
of the interface.

Tested on Huwaei Mate8 and Samsung S7.
2017-02-03 15:15:05 +00:00
jummp01
d8438c5ae8 Gmail: implement ApplaunchInterface
Adapts gmail workload to support applaunch workload by implementing the
required methods of the interface.

Tested on Huawei Mate8 and Samsung S7.
2017-02-03 15:14:56 +00:00
jummp01
ca7a1abe78 Add new applaunch workload.
The workload supports launch time measurement of other uxperf workloads that
implement the ApplicationlaunchInterface. It takes a uxperf workload as a parameter
and helps to instrument the application launch time in two modes.

a)launch_from_background
b)launch_from_long_idle

The workload executes in two major phases.
1- Setup phase: clears initial dialogues on the first launch of an application.
2- Run phase: Runs multiple iterations of the application launch and measures
the time taken for launch. Iteration number can be specified as parameter applaunch_iterations.

Applaunch measurements are captured in the logcat file.
2017-02-03 15:14:47 +00:00
jummp01
bd37973442 Remove existing applaunch workload
The applaunch workload is deprecated to be replaced by another implementation.
2017-02-03 15:14:37 +00:00
jummp01
c38dc287ab Move UxperfParser into utils
UxperfParser class is moved from the UxperfResultProcessor class into a new
python module in utils. This will help to use the UxperfParser even when
the result procesor is not configured.
2017-02-03 15:14:27 +00:00
jummp01
3feb702898 fps: move VSYNC_INTERVAL into utils
It is not anything to do with instrument, but a generic ocnstant,
and this way it can be used by the other parts of the code line.
2017-02-03 15:14:16 +00:00
jummp01
0f57dee6bf Add ApplaunchInterface class
Inorder to support application launch workload, a new interface is created
which has methods that need to be implemented by all workloads that
support application launch time instrumentation.
2017-02-03 15:14:03 +00:00
jummp01
99b46b4630 Add UiAutoUtils class
UiAutoUtility class added to support utility functions used for UiAutomation.
This class can help in refactoring some existing fucntionalities into utility functions.

Launch command generation is added as a utility class method which can be used
by workloads to construct their launch command from parameters passed.
2017-02-03 15:13:50 +00:00
jummp01
4ce20e2d3f Move package parameters to UxperfUiAutomation
All the uxperf workloads get some common package parameters.
These are moved to the parent class and a new method is introduced to fill
these parameter values. All the uxperf workloads can call this method to resolve
the package parameters.
2017-02-03 15:13:32 +00:00
jummp01
65aa00483b Add pressHome() method in the Base class
This function Presses Home button on the Android User Interface.
2017-02-03 15:12:35 +00:00
setrofim
da7a3276ed Merge pull request #339 from marcbonnici/revent_fix
Revent fix / improvments
2017-02-01 18:10:32 +00:00
Marc Bonnici
b89d9bbc4b StateDetection: Moved check for missing phase definition earlier.
Now checks to see if a phase is correctly defined before image matching
so that it is only performed if required.
2017-02-01 18:04:05 +00:00
Marc Bonnici
54bffb45ab Revent: Fixed uninitialized variable. 2017-02-01 18:04:05 +00:00