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

199 Commits

Author SHA1 Message Date
Marc Bonnici
8e94b79ed8 LinuxDevice: Now raises an error if trying to hotplug all cores.
Previously this would try to automatically enable an additional core to ensure
that all cores were not hot-plugged, however it would do this unnecessarily if
another core that wasn't the first of its types was already online.
2017-06-12 17:56:06 +01:00
Marc Bonnici
37d99e4a5d LinuxDevice: Remove duplicate method and rename for consistency
These function were duplicated of each other so one has been removed and the
remaining methods renamed for consistency with WA terminology and the relevant
calls updated.
2017-06-12 17:27:21 +01:00
Marc Bonnici
e62262dbb3 Uiauto2 Workloads: Fixes applaunch bug in androind N
In order to workaround an bug in applaunch running on android N, all of the
workloads have been updated to the latest gradle build system, the timeout in
the baseclass has been changed from a TimeUnit to a regualr long and a
duplicately declared parameter bundle has been removed.
2017-06-08 16:55:47 +01:00
Marc Bonnici
b64c615e8e Uiauto2: Fixes leftover references to .uiautoapk 2017-06-08 11:23:45 +01:00
Marc Bonnici
242cf7e33a Revert "Android Device: Add force flag to install_apk"
This reverts commit 5d8305cfdc.
2017-06-05 17:00:40 +01:00
Marc Bonnici
bf694ffdf1 Revert "AndroidResource: Add a UiautoApk resource type."
This reverts commit bc6af25366.
2017-06-05 16:55:47 +01:00
Marc Bonnici
b36e0061e1 AndroidWorkload: Updated to use an 'APK' file instead of a 'uiautoapk' 2017-06-05 16:55:47 +01:00
Marc Bonnici
526ad15c01 AndroidResource: Updated APKFile to add support for uiautomator tests.
In newer versions of adb, files cannot be installed unless they use the
`.apk` extension therefore we need to be able to distinguish between
regular apks and instrumented test files.
2017-06-05 16:55:38 +01:00
Sergei Trofimov
0694ab6792 LinuxDevice: rename get_number_of_online_cpus arg
Renamed "c" to "core", as that gets passed as a keyword argument inside
get_runtime_parameters().
2017-06-01 14:29:19 +01:00
Marc Bonnici
70f646f87d AndroidWorkload: Added unchangeable android permissions
Some android permissions are categorized as 'unchangeable' so we don't need to
try and set them.
2017-05-31 10:36:35 +01:00
Marc Bonnici
076772da4d Uiautomator: Upgraded uiautomator base classes to Uiauto2
Uiautomator1 has been deprecated, therefore the uiautomation base classes have
been upgraded to use uiautomator2 and the new gradle build system.
Altered to retrieve `package_name` rather than `package` as per the previous commit.
2017-05-30 17:26:14 +01:00
Marc Bonnici
138c95745e AndroidWorkload: Renamed package parameter to package_name
Using the new instrumental based testing method, `package` is a reserved
parameter and is not passed to the workload correctly.
2017-05-30 12:06:50 +01:00
Marc Bonnici
8125c3e0a2 Android Workload: Updated to install and use Uiautomator 2 tests.
The new method of using uiautomation 2 is by using instrumented apk files rather
than JAR files. This commit updates the base workload has been updated to
install/uninstall the new uiautomation APK files and to invoke the relevant
instrumentation.
2017-05-30 12:06:50 +01:00
Marc Bonnici
81bdc7251b AndroidDevice: Pylint Fix 2017-05-30 12:06:36 +01:00
Marc Bonnici
bc6af25366 AndroidResource: Add a UiautoApk resource type.
When moving to Uiautomation 2, tests are now complied into apk files rather than
jar files. To avoid conflicts with regular workload apks a new resource type is
added to retrieve the test files which will be renamed to have the extension
.uiautoapk
2017-05-23 11:15:55 +01:00
Marc Bonnici
5d8305cfdc Android Device: Add force flag to install_apk
A force flag has been added to the `install_apk` method which
ignores the check that the specified file is an apk. This is to support
the new UiAutomation Apk which have been given the extention .uiautoapk.
2017-05-17 13:47:39 +01:00
Marc Bonnici
51c92cb2f5 Workloads: Updated to use new media refresh method
Updated the base android workload and google photos workload to pass a list of
updated files rather than their directory.
2017-05-11 18:17:38 +01:00
Marc Bonnici
e98b653b3e AndroidDevice: Add refresh_device_files method
Adds a method to determine the appropriate method of triggering a media refresh
of a given list of file based on the devices android version and root status. If
a device is running android marshmallow and below or has root, trigger a refresh
of the files containing folder otherwise trigger a refresh of each individual
file.
2017-05-11 18:17:38 +01:00
Marc Bonnici
b10b5970c3 AndroidDevice: Add a broadcast_media_scan_file method
In android N it is no longer allowed to trigger a media refresh of a directory
without root, therefore this method has been added to trigger a refresh of an
individual file.
2017-05-11 09:44:49 +01:00
Marc Bonnici
e866cfed12 AndroidDevice: Add as_root flag to broadcast_media_mounted
Allows the `MEDIA_MOUNTED` broadcast to be performed as root as
this now requires elevated permission in android N.
2017-05-11 09:11:24 +01:00
Sergei Trofimov
cc3a815cb7 uxperf workloads: only broadcast media mounted if needed
Previously AndroidPerfWorkload broadcast media mounted unconditionally
inside push_assets and delete_assets. This change makes it so the
broadcast only happens if something was actually pushed/needs to be
delete.
2017-05-10 15:42:10 +01:00
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
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
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
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
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
Marc Bonnici
2bd77f0833 UiAutomator: Removed unnecessary class files.
Removed stale classes from the repository.
2017-02-03 17:14:33 +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
54bffb45ab Revent: Fixed uninitialized variable. 2017-02-01 18:04:05 +00:00
Marc Bonnici
e7a47f602d Revent: Removed check for 'wait_for_stdin'.
Revent is terminated from WA via a 'SIGINT', therefore this means
that in order for revent to receive the signal and deal with it
accordingly, revent always needs to be listening on STDIN regardless of
the 'wait_for_stdin' flag.
2017-02-01 18:03:28 +00:00
Sergei Trofimov
490dd404ae AndroidDevice: write "dumpsys window" output on host
On Android targets, WA collects device display information by running
"dumpsys window" during run initialisation. Previously, this was
redirectied into on-device file (under the working directory) and then
pulled from the target.

It looks like on Android-on-ChromeOS devices the redirect leads to an
"Unknown Error" and the resulting file is empty. To get around that,
this commit modfies the dumpsys command so that the output is collected
directly from the shell's stdout and then writen on the host.
2017-01-24 17:52:51 +00:00
setrofim
fbb9908298 Merge pull request #330 from jimboatarm/break_setup
Splits ApkWorkload setup() into short methods.
2017-01-13 15:39:11 +00:00
jummp01
01fa0a3571 Splits ApkWorkload setup() into short methods.
Apkworkload setup phase performs many functionalities in
a single method that is broken down into short methods.
The split short methods can be called individually when
relevant use cases arise.
2017-01-13 11:56:39 +00:00
jummp01
fa553ee430 Changes Action Logger to give epoch time
Log time changed to produce epoch time in milli seconds.
Nano to milli second conversion done in uxperf result
processor is removed.

Tested on Mate8 and time obtained is verified.
2017-01-12 10:30:07 +00:00
James Hartley
b4026ae390 Fix inverted swipe up/down gestures
Tested on Chromebook and Mate 8
2016-12-15 15:28:23 +00:00
setrofim
d493b1e790 Merge pull request #307 from marcbonnici/exact_abi
Modified how apks containing native code are matched to a target devices supported abi(s).
2016-12-14 10:32:56 +00:00
Marc Bonnici
694d51ffb6 AndroidWorkload: Fixed validate version error messages.
Fixed typos in ``validate_version`` method which caused incorrect reporting
of maximum apk version.
2016-12-12 18:09:40 +00:00
Marc Bonnici
1477a89ee4 AndroidDevice: Renamed 'supported_eabis' property to 'supported_abis'
Renamed android device property from 'supported_eabis' to 'supported_abis' to be consistent with linux device.

Updated dex2oat workload to use new property name.
2016-12-09 15:23:58 +00:00
Marc Bonnici
0dfbbae7b6 Renamed 'check_abi' parameter to 'exact_abi' 2016-12-09 14:11:16 +00:00
Marc Bonnici
a8a8d21de6 AndroidWorkload: Modified workload to properly check for an apks abi
Previously when retrieving apks only it's name would be used to choose
an apk. Now the native code reported by the apk is used to determine
the correct version to run for the specific device. It tries to
match the primary abi of device with native code before falling back to
using a compatible apk.

When using the check_abi parameter it no longer relies on naming convention
and only allows apks with native code supporting a devices primary abi to be
used.

Updated the relevant documentation.
2016-12-09 14:11:16 +00:00
Marc Bonnici
f467f6f991 AndroidDevice: Added method to retrive primary abi of installed package
Tries to retireve the primary abi of a currently installed package on
device.
2016-12-09 14:11:16 +00:00
Marc Bonnici
eb239c65d0 LinuxDevice: Added supported eabi property.
Added property to linux device to return list of supported abis
to be consistent with android devices. Currently only returns a
list containing the primary abi.
2016-12-09 14:11:16 +00:00
setrofim
607187ad5b Merge pull request #306 from marcbonnici/revent_BC
Revent: Fixed backwards compatibility with v1
2016-12-02 17:02:06 +00:00
Marc Bonnici
b6e077c06b Revent: Fixed backwards compatibility with v1.
Fixed new gamemode not being set for compatibility mode.
Fixed input buffer not being flushed causing replay to fail.
Fixed infinte loop if revent recording did not end correctly.
Updated revent binaries.
2016-12-02 16:58:09 +00:00
setrofim
751970f991 Merge pull request #302 from marcbonnici/master
Revent: Added updated revent binaries.
2016-12-02 10:31:03 +00:00