1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 12:24:32 +00:00

1176 Commits

Author SHA1 Message Date
scott
d662498ea8 GooglePlayBooks: Updated workload to work with the latest version
GooglePlayBooks UI has changed significantly in the latest
version. This includes extra dialog boxes upon first use
which need to be handled.
2017-08-03 09:56:47 +01:00
marcbonnici
220e0962e1 Merge pull request #452 from setrofim/master
Device: raise RuntimeError in _check_ready
2017-08-02 13:43:06 +01:00
Sergei Trofimov
be3c91b131 Device: raise RuntimeError in _check_ready
Previously, a AttributeError has been raised. This causes issues when
attempting to access some properties that rely on invoking commands on
the device. The error would get swallowed up in Python attribute
resolution machinery, resulting in an error claiming a missing
attribute.

For example, for AndroidDevice, "abi" is a property that internally
calls getprop(), which executes on the device, and thus requires a
connection. If attempting to access device.abi before device.connect()
has been invoked, the following sequence takes place

1. Caller tries to access attribute "abi" of device, which resolves to
   the device.abi property defined in the class.
2. device.abi calls device.getprop()
3. ...which calls device.execute()
4. ...which calls device._check_ready()
5. device._check_ready() raises AttributeError('device not ready.')
6. That gets propagated all the way up to 1., which gets interpreted
   as attribute not being found.
7. Since AndroidDevice defines a __getattr__(), that gets called next
8. __getattr__() looks for a loaded Device module that has an "abi"
   attribute. Since there isn't one, it raises AttributeError('abi').

The result is that the error reports a missing "abi" attribute, rather
than "device not ready", leading to some fun debugging.

Raising RuntimeError (which more appropriate for the circumstances
anyway) does not trigger __getattr__, so the correct error message is
reported to the user. The text of the message has also been adjusted to
make it clearer what has likely gone wrong.
2017-08-02 13:39:55 +01:00
marcbonnici
efad084b24 Merge pull request #446 from setrofim/master
utils/trace_cmd: expect ': ' in task name
2017-07-24 16:40:09 +01:00
Sergei Trofimov
6da0550b98 utils/trace_cmd: expect ': ' in task name
': ' is used as the delimiter for the different parts of of the event
line; unfortunately, it is also a valid character sequence to appear in
a task name.

This change attempts to perform the event line split correctly by
ensuring that the cpu id is present in the first part.
2017-07-24 09:31:31 +01:00
marcbonnici
9500bcd914 Merge pull request #443 from setrofim/master
utils/trace_cmd: fix event parsing
2017-07-20 17:10:21 +01:00
Sergei Trofimov
7f8e7fed4b utils/trace_cmd: fix event parsing
Make event preamble parsing more robust in cases there are multiple
instances of ' [' (e.g. as part of thread name) by splitting exactly
once from the right. The right-most columns are the timestamp and the
cpu id, and much more restricted (and therefore predictable) in their
formatting.
2017-07-20 15:52:31 +01:00
marcbonnici
87972e2605 Merge pull request #441 from setrofim/trace-cmd-optimization
Optimize parsing of trace-cmd output
2017-07-20 11:48:03 +01:00
Sergei Trofimov
33874a8f71 utils/trace_cmd: reduce regex use
Do not attempt to regex match each line for dropped events/preamble. Use
substring search to detect them first, and only use regex on relevant
lines.
2017-07-20 11:12:54 +01:00
Sergei Trofimov
93dba8b35d utils/trace_cmd: optimize event parsing
Use string searching and splitting instead of regex matching to parse
trace events. This significantly speeds up trace parsing.
2017-07-20 11:12:53 +01:00
Sergei Trofimov
6f629601be utils/trace_cmd: lazy evaluation of event fields
Parsing if a trace events body text into fields is potentially
expensive, so only do it if the fields are being accessed.
2017-07-20 11:12:53 +01:00
marcbonnici
565f352114 Merge pull request #439 from setrofim/master
AndroidDevice: adjust APK install timeout to 5min
2017-07-19 10:02:18 +01:00
Sergei Trofimov
920d80ad6e AndroidDevice: adjust APK install timeout to 5min
install_apk() was using the default timeout of 30 seconds, this can
cause problems for some applications on slower targets. Since
installation is expected to be a long-ish operation, there is not reason
for the timeout to be this short.

This commit adjusts the timeout to 5 minutes, which should be a more
reasonable value for most applications. For some apps with particularly
large APKs, this may not be enough, but in those cases, the default
should already be overriden on per-worload bases.
2017-07-19 10:01:00 +01:00
setrofim
9962b413d7 Merge pull request #438 from yln/master
Update docs
2017-07-13 08:08:13 +01:00
setrofim
fdff80a72b Merge pull request #437 from marcbonnici/fire_adobereader
Misc Fixes
2017-07-13 08:06:30 +01:00
Julian Lettner
6cc4626f50 Update docs: $WA_HOME -> $WA_USER_DIRECTORY 2017-07-12 16:02:02 -07:00
setrofim
665d76456b Merge pull request #436 from setrofim/master
utils/android: better error massage when no exit code found
2017-07-12 13:36:09 +01:00
Sergei Trofimov
f4b91b6c9e utils/android: better error massage when no exit code found
Provide the stdout/stderr text as part of the messsage in the
exception raised when no exit code can be identified from the adb
command output.
2017-07-12 13:34:20 +01:00
Marc Bonnici
4730ac2989 AndroidWorkload: Removal of explicit parameter setting
'exact_abi' was being explicitly set without proper checking, however
this should already be taken care of in the supers automagic parameter
setting.
2017-07-12 09:48:03 +01:00
Marc Bonnici
6737fda24e AdobeReader: Removes use of device search button
On amazon fire tablets the search button triggers a custom implemented
search dialog instead of performing a search within the app.
2017-07-12 09:48:03 +01:00
setrofim
2a07ed92fe Merge pull request #433 from marcbonnici/sysfs_fix
Instrumentation: Fixes SysfsExtractor with tmpfs
2017-07-10 08:24:00 +01:00
Marc Bonnici
a4c7340746 Instrumentation: Fixes SysfsExtractor with tmpfs
Previously due to WA automagic the initialization method would only be
called once globally, meaning that it was called for cpufreq extraction
but not for sysfiles. This commit splits SysfsExtractor into a base
FsExtractor and a SysfsExtractor subclass and the initialization methods
are explicitly called by both children.
2017-07-07 17:43:43 +01:00
setrofim
6eb4e59129 Merge pull request #432 from bjackman/geekbench-corporate
geekbench: Fix running multiple 'times' on Geekbench 4
2017-07-06 11:29:27 +01:00
Brendan Jackman
d65561e3e9 geekbench: Fix running multiple 'times' on Geekbench 4
You only have to press the back button once to get back to the "run
benchmarks" screen.
2017-07-06 11:12:19 +01:00
setrofim
64d3ddc8e6 Merge pull request #428 from bjackman/geekbench-corporate
Geekbench: Add support for Corporate version
2017-07-05 11:45:32 +01:00
setrofim
579b940d75 Merge pull request #431 from setrofim/master
trace-cmd: documentation fixes.
2017-07-05 08:39:54 +01:00
Brendan Jackman
0656e61bc2 Geekbench: Add support for Corporate version
The Corporate version is a specialised version of Geekbench. It has
different package names and does not require dismissing a EULA. The
new corporate version is added as a distinct
benchmark ("geekbench-corporate" vs "geekbench").

Note that this changes the wait-for-results UiAutomator snippet from
looking for "Running Benchmarks..." to "*Running*". This is because
the version I've tested updates the text widget with the name of each
benchmark phase as it is run. However I don't know if this is a
feature of the Corporate version or simply of Geekbench 4.1.0.
2017-07-04 18:05:20 +01:00
Sergei Trofimov
13e787b5d0 trace-cmd: documentation fixes.
- Remove reference to default events from the overall workload
  documentation. It was, as of recently, outdated, and was also
  redundant, as the actual defaults will be in the parameter-specific
  documentation.
- Remove reference to Android-specific trace-cmd binary -- this was not
  true for a long time.
- Clarify that the on-host trace-cmd binary is now optional due to the
  report_on_target config.
- Fix a few misc typos.
2017-07-04 16:53:32 +01:00
setrofim
4d7ef408c9 Merge pull request #429 from bjackman/remove-cpufreq-interactive
trace-cmd: remove cpufreq_interactive from default events
2017-07-04 13:23:33 +01:00
Brendan Jackman
a533680e49 trace-cmd: remove cpufreq_interactive from default events
The interactive governor isn't standard any more (and was
Android-only anyway). Remove this default so you don't get errors for
kernels that don't support it.
2017-07-04 12:15:18 +01:00
Sergei Trofimov
4ddb6f44fc geekbench: correct v3 version number
Current APK discovery rules will match against full APK version string,
so must be "3.0.0" rather than just "3".
2017-07-03 17:50:44 +01:00
Sergei Trofimov
1238cb71f0 ssh: raise correct error on EOF
Raise DeviceError, rather than TargetError, on EOF inside ssh_get_shell.
This is a fix for an issue introduced by a devlib backport in 51db53d9.
2017-07-03 11:01:11 +01:00
marcbonnici
53203bfb50 Merge pull request #426 from setrofim/master
AndroidDevice: more robust getprop parsing
2017-06-28 17:23:56 +01:00
Sergei Trofimov
11859af894 AndroidDevice: more robust getprop parsing
Ran into a development target on which one of the values in getprop
output contained a new line. Updating getprop parsing logic to handle
such cases by switching to a regex.
2017-06-28 17:05:47 +01:00
marcbonnici
1f5f9cf478 Merge pull request #425 from setrofim/master
acmecape: echo command that is going to be used
2017-06-28 11:52:57 +01:00
Sergei Trofimov
52a07160b9 acmecape: echo command that is going to be used 2017-06-28 11:49:20 +01:00
marcbonnici
0d8204121d Merge pull request #420 from setrofim/master
ApkWorkload: only uninstall if package is already installed
2017-06-22 14:43:45 +01:00
Sergei Trofimov
a47d6c6521 ApkWorkload: only uninstall if package is already installed
Attempting to uninstall an non-existing package will result in an error.
So, when replace=True for install_apk(), only attempt to uninstall if
the package is already present on the target.
2017-06-22 14:31:25 +01:00
setrofim
d391b28d2e Merge pull request #419 from AnthonyARM/master
Fixed missing comma in list
2017-06-21 16:43:35 +01:00
Anthony Barbier
e42099851b Fixed missing comma in list 2017-06-21 16:41:12 +01:00
marcbonnici
0c0ccb10d9 Merge pull request #418 from setrofim/master
cpustates: workaround for disabled cpuidle
2017-06-21 15:31:47 +01:00
Sergei Trofimov
486494f1f2 cpustates: workaround for disabled cpuidle
Add "no_idle" parameter to work around the problem where cores are
reported to be in "unknown" state if there are no cpuidle transitions in
the trace. If this parameter is set, cpustates will assume cores are
active without waiting for an idle transition.
2017-06-21 15:30:43 +01:00
marcbonnici
919a44baec Merge pull request #417 from setrofim/master
Revert "cpustates: fix idle state assumption on freq transition"
2017-06-21 14:22:58 +01:00
Sergei Trofimov
4f09c3118a Revert "cpustates: fix idle state assumption on freq transition"
This reverts commit 9bd745b347ef1a18a8b46a07cf5fa6dd3af642f8.

When a frequency is changed on a core, cpufreq reports a frequency
transition for all cores in the frequency domain. This means it is not
safe to assume a core is not idling just because there is a frequency
transition reported for it (that just means that there is at least one
core on that frequency domain that is not idling). Moreover, the
transitions are always reported in the same order so there is no way to
infer which core triggered it.
2017-06-21 14:13:24 +01:00
setrofim
b6b1b259dc Merge pull request #410 from setrofim/acmecape
instrumetnation: add support for BayLibre ACME cape
2017-06-21 09:30:47 +01:00
marcbonnici
f1b63b239c Merge pull request #415 from setrofim/master
cpustates: fix idle state assumption on freq transition
2017-06-20 16:03:36 +01:00
setrofim
797cb3c9ea Merge pull request #414 from marcbonnici/uiauto_install
AndroidWorkload: Uninstall uiauto apks before reinstalling
2017-06-20 15:58:42 +01:00
Sergei Trofimov
9bd745b347 cpustates: fix idle state assumption on freq transition
If a frequency transition is observed before an idle state can be
established, assume idle state is -1 (i.e. the core is running). This
will ensure correct stats for platforms with disabled cpuidle.
2017-06-20 15:48:51 +01:00
Marc Bonnici
9f3ecd3715 AndroidWorkload: Uninstall uiauto apks before reinstalling
Due to the fact that uiauto apk files built on different machines will
be signed with different keys, adb will fail to overwrite a previous
version even when set to replace. This commit now will uninstall the
previous uiauto apk file if present before attempting to install the new
version.
2017-06-20 15:19:19 +01:00
setrofim
1a177dd52f Merge pull request #413 from jimboatarm/skype-timeoutincrease
Skype: Change timeout value for endcall
2017-06-20 15:05:21 +01:00