1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-15 15:18:56 +00:00

106 Commits

Author SHA1 Message Date
muendelezaji
6c4a7e75f6 Update base class & rebuild workloads 2016-05-27 15:39:54 +01:00
muendelezaji
51c784f5dd Use consistent method names 2016-05-27 14:37:54 +01:00
muendelezaji
403d8ea1bf Move common methods to base classes 2016-05-27 14:31:13 +01:00
John Richardson
573c9b3226 Remove redundant clickUiObject method
Remove the clickUiObject method from the base class and refactor the
gmail workload to use clickAndWaitForWindow methods instead. For quick
popup menus prefer simple click events.
2016-05-26 17:34:24 +01:00
John Richardson
e3711a764f Add logic to dumpsys helpers to discover present view
Add intelligence to helper method in UxPerfUiAutomation class to query
the present view during the method call rather than passing this in
explicitly as a parameter.

Fix confirmAccess method to first test for the existence of a
confirmation object before waiting on timeout.
2016-05-26 09:29:47 +01:00
jimboatarm
32dec69742 Merge pull request #29 from jimboatarm/allow-all-permissions
Grant all permissions starting with 'android.permission'
2016-05-25 17:57:02 +01:00
muendelezaji
9645b0a410 Grant all permissions starting with 'android.permission'
- previously, anything after the first contiguous block is skipped
2016-05-22 23:40:56 +01:00
John Richardson
2532f36a62 Add Multiapp workload
A new workload for testing context switching between applications.
Uses googlephotos as the producer workload and gmail and skype as
the consumer workloads.
2016-05-17 14:52:43 +01:00
James Hartley
e95227175d Add setScreenOrientation to BaseUiAutomation class
This allows workloads to be launched in a pre-determined orientation not the orientation of the physical device itself.

Updated the productivity workloads to take advantage of this new facility.
2016-05-16 17:37:45 +01:00
jimboatarm
6a1ca75f2d Merge pull request #3 from jimboatarm/wifi_check
Add method to check wifi access on device
2016-05-11 10:01:20 +01:00
John Richardson
c8fa9a23cf Move confirmAccess method to UxPerfUiAutomation
Move confirmAccess method out of reader and skype workloads into
UxPerfUiAutomation base class for code reuse.

Amend project properties for reader workload to use SDK version 18.

Update jar files appropriately.
2016-05-09 17:30:39 +01:00
muendelezaji
cde0b12c5d Changes after review of pull #5
- Use superclass writeToFile - improved to accept generic Map collections
- Change timer results format to one more in line with the rest
2016-05-05 20:07:51 +01:00
muendelezaji
f648cbe614 Merge remote-tracking branch 'upstream/master' into wl-skype 2016-05-05 18:46:33 +01:00
John Richardson
f3d7d6167a Add method to check wifi access on device
Method to ascertain if wifi connectivity is enabled on the device. Uses
grep and dumpsys. Returns exit code.
2016-05-05 16:27:53 +01:00
James Hartley
d77b29165f Fixes for Reader/Gmail/Photos
Check in missing UiAutomation .class files
Fix generation and deletion of dump sys logs including renaming to a standard [test tag]_[test number].log format
Improved Reader to run across a range of devices with subtlety different layouts and views
2016-05-05 11:21:31 +01:00
James Hartley
8e66616159 Add clickUiObject to BaseUiAutomation
Convenience method to click on o UiObject and throw an exception if the view does not change within a specified timeout.
2016-05-03 18:13:03 +01:00
muendelezaji
afa580af63 ApkWorkload extension support
- Allow disabling main activity launch in setup (required for some apps)
- Parameterise clear data on reset (default behaviour unchanged)
2016-05-03 14:25:15 +01:00
James Hartley
d01f338a1d Add UxPerfUiAutomation class
This extends on BaseUiAutomation to include Ux performance instrumentation and UiAutomation convenience classes.

Todo - extend the create workload infrastructure to allow you to create a new UxPerfUiAutomation workload.
2016-04-28 13:00:02 +01:00
James Hartley
73c8ca86a3 Update BaseUiAutomator class to API level 18
The change will allow us to use UiAutomator methods introduced in API 18, such as resourceId.
As a consequence of the change all dependent uiauto workloads have been incremented also.

Tested by rebuilding all uiautomator workloads. They were not run on devices.
2016-04-26 17:50:29 +01:00
Sergei Trofimov
697aefc7bb ApkWorkload: clear app data on failed uninstall.
If uninstall fails, "pm clear" should be called to make sure that the
next time the app is launched it starts from a known state (which would
normally be ensured by the uninstall).
2016-04-19 16:43:42 +01:00
Sergei Trofimov
8bc71bb810 ApkWorkload: report correct apk verison on failed install
It's possible that there is already a version of an app on target that
differs form the version of the apk on the host. In such cases, WA will
usually try to uninstall the target version and install the host
version.

It's possible that the uninstall may fail. If that happens, it will be
reported as a warning but workload exectuion will proceed with the
target version. In this case, apk_version would have already been set to
that of the host apk. This change ensures that the APK version is
correctly set to the target version (the one that actually ran).
2016-04-19 16:33:37 +01:00
Sergei Trofimov
48259d872b ApkWorkload: add package verison to the result as a classifer. 2016-04-14 11:23:39 +01:00
setrofim
9ee1666a76 Merge pull request #131 from ep1cman/master
SysfsExtractor & Busybox fixes
2016-04-07 10:31:31 +01:00
Sebastian Goscik
8dcdc9afe1 busybox: Rebuilt busybox binaries to prefer applets over system binaries
Busybox will now prefer to use its own built in applets before it tries
using the system binaries so that we are always running commands as expected.
2016-04-07 10:29:13 +01:00
Sebastian Goscik
507090515b Merge pull request #134 from jimboatarm/master
Fix to install APKs with whitespace in their path name
2016-04-06 10:56:58 +01:00
James Hartley
1dfbe9e44c Fix to install APKs with whitespace in their path name 2016-04-06 10:53:08 +01:00
Sergei Trofimov
391b0b01fc pylint/pep8 fixes
- android/workload: emoved an extra bank line between methods
- trace_cmd: define member attribute inside __init__
- adb_shell: ignore pylint warning about too many branches in this case
2016-04-05 11:36:39 +01:00
James Hartley
ff5f48b7e7 Fix for packages without launch activities
If the package has no defined launch activity you must call the
activity manager in a different way.
2016-04-05 10:24:42 +01:00
Sebastian Goscik
a2257fe1e2 BaseLinuxDevice: gzipped property files are now zcat'ed
Before they were cat'ed this gave garbage output for compressed files.
Cat-ing is necessary since not all properties are normal files (sysfs).
2016-03-24 16:28:19 +00:00
Sergei Trofimov
203a3f7d07 LinuxDevice: fixed reboot.
- Deal with the dropped connection on issuing "reboot"
- Introduced a fixed initial delay before polling for connection to
  avoid re-connecting to adevice that is still in the process of
  shutting down.
2016-02-22 09:45:42 +00:00
Sebastian Goscik
de021da300 ApkWorkload: Fixed runtime permission granting
"Normal" android permissions are automatically granted and cannot
be changed. Trying to "pm grant" these caused an error, this should
no longer occur.
2016-02-15 11:38:28 +00:00
Sebastian Goscik
5203188d9e LinuxDevice: Added as_root to kick_off 2016-02-12 09:54:14 +00:00
Sebastian Goscik
dec574e59e AndroidDevice: Removed duplicate parameter 2016-02-03 15:06:00 +00:00
Sergei Trofimov
eaabe01fa5 BaseLinuxDevice: added insmod() method.
Allows insting a kernel module on the target from a .ko located on the
host.
2016-01-27 17:15:41 +00:00
Sergei Trofimov
dc07c8d87e BaseLinuxDevice: added lsmod() method
Execute lsmod on the target device and parses the output into named
tuples.
2016-01-27 16:50:29 +00:00
Sebastian Goscik
1e6eaff702 revent: Added record and replay commands
Added two commands to WA to record and replay input events using revent.

As part of this also added the ability to get a device model from
android and linux device. This may need to be improved in the future.
2016-01-22 10:40:03 +00:00
Sebastian Goscik
7c35c604f4 BaseLinuxDevice: Tidied up the way binaries are handled
Added:
get_binary_path: Checks binary_directory for the wanted binary, if
                 if its not there, it will use which to find a
                 system one. returns the full path

install_if_needed: will install a binary only if it is not present.

Changes:
 - Busybox is now deployed to non-rooted devices
 - is_installed has now been removed as the new functions supersede it
 - binaries will now always be installed to `binaries_directory` and
   not system folders.
 - updated workloads to use these new functions
   - rt-app and sysbench might still need work
2016-01-19 10:45:09 +00:00
Sebastian Goscik
d9c4063307 AndroidDevice: fixed get_pids_of
As of Android M ps can no longer filter by process name. This is
now handled using grep from busybox
2016-01-13 17:07:30 +00:00
Sebastian Goscik
f1bb44b3e7 ApkWorkload: Added automatic granting of runtime permissions
As of Android 6.0, apps can request permissions at runtime. If the
target device is running Android 6.0+ these permissions are now automatically
granted.
2016-01-11 13:58:38 +00:00
Sergei Trofimov
438e18328d AndroidDevice: remove unnecessary escapes from update locksettings command
The single quotes will be escaped further down the command processing
chain.
2015-12-15 09:52:46 +00:00
setrofim
9222257d79 Merge pull request #67 from ep1cman/recentfling
Recentfling
2015-12-11 11:06:45 +00:00
Sebastian Goscik
d3470dca73 AndroidDevice: Fixed swipe_to_unlock
Previously swipe_to_unlock was not used and conflicted with a method
of the same name.

 - swipe_to_unlock() renamed perform_unlock_swipe()
 - swipe_to_unlock parameter now takes a direction, this allows swipe unlocking on Android M devices
 - ensure_screen_is_on() will now also unlock the screen if swipe_to_unlock is set
2015-12-11 10:58:32 +00:00
Sascha Bischoff
72a617c16d Gem5Device: Remove the rename in pull_file to align with gem5 2015-12-10 11:09:42 +00:00
Sascha Bischoff
d6355966bf Gem5Device: Removed unused methods 2015-12-10 11:09:42 +00:00
Sascha Bischoff
9ccf256ee8 AndroidDevice: Use content instead of settings to get ANDROID_ID
We move from using settings to using content to get the ANDROID_ID as
this works across a wider range of Android versions.
2015-12-10 11:09:42 +00:00
Sascha Bischoff
e7c75b2d3b Gem5: Add support for deploying the m5 binary 2015-12-10 11:09:41 +00:00
Sascha Bischoff
480155fd8c Gem5Device: Try to connect to the shell up to 10 times 2015-12-10 11:09:41 +00:00
Sascha Bischoff
d98bdac0be Gem5Device: Move resize shell commands to own method
Moved the commands to resize the shell to their own method. They are
now executed twice. Once as soon as the shell is connected, and a
second time as part of initialize. This latter call takes place after
the isntallation of busybox.
2015-12-10 11:09:41 +00:00
Sascha Bischoff
32cf5c0939 Gem5Device: Removed busybox dependency. 2015-12-10 11:09:41 +00:00
Sebastian Goscik
bef8fb40ef Updated pylint for v1.5.1
Fixed WA for the latest version of pylint (1.5.1)
2015-12-09 16:52:39 +00:00