1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-23 11:09:05 +00:00

2122 Commits

Author SHA1 Message Date
Luis Machado
0a9c16b4a4 Add missing gradle.properties file 2024-12-17 12:00:27 +00:00
Luis Machado
a44c5fb604 [workloads/jetnews] Update workload documentation to mention API level restrictions 2024-11-26 13:18:03 +00:00
Luis Machado
0dcae68715 [workloads/jetnews] Bump the minSdkVersion to 28 and targetSdkVersion to 34
API level 27 (Android 8.1/Oreo) doesn't report a frame metric called
"deadline missed", but the JankTest library expects to be able to find
data for that metric. If it is not found, an assertion is reported and
the run fails.

Given Android Oreo is reasonably old at this point, set the minimum SDK
version to 28 so we can gather all the metrics we need.

Also bump the targetSdkVersion to make it clear what version was used
for putting this code together.
2024-11-26 13:10:22 +00:00
Luis Machado
0cdccc137e [workloads/jetnews] Restore test default timeout, repeat count and fling speed 2024-11-13 17:55:56 +00:00
Luis Machado
c9ffbfb7cf [workloads/jetnews] Improve reliability of object detection
I noticed we were sometimes getting stale object exceptions. To help prevent
that situation from happening, pass around resource id's for the objects and
only fetch an instance of the objects whenever we need to click/scroll.

This means the time between fetching the object and using it is short, and
hopefully the object won't go stale or get recycled in that brief moment,
preventing the stale exceptions.
2024-11-13 17:48:41 +00:00
Luis Machado
5180fed72f [workloads/jetnews] Harden JetNews testing to cope with tablets/small phones
On tablets we have a landscape view by default, so we need to account for that
in our tests. On smaller phones, the landscape mode doesn't show the article
preview.

On both tablets and small screen phones, we need to be mindful of scrolling
too fast and missing an element we're looking for, either because a bigger
screen means we scroll faster or because a smaller screen means only a few
items are shown at one time.
2024-11-05 11:35:09 +00:00
Luis Machado
e85cca9ffc [workloads/jetnews] Fix more linter issues (E302 and E261) 2024-09-13 08:05:35 +01:00
Luis Machado
651fd236fe [workloads/jetnews] Disable too-many-ancestors linter for Jetnews class
Drop the warning as we already have cases where it was disabled in geekbench
and gfxbench.
2024-09-13 07:09:47 +01:00
Luis Machado
77b3dfc61d Fix linters/tests CI issues 2024-08-29 15:00:29 +01:00
Luis Machado
e046461bfa [workloads/jetnews] Add missing self reference 2024-08-29 14:48:25 +01:00
Luis Machado
fefaa3c86d [workload/jetnews] Use Jank testing classes to implement jank testing in a simpler way
Modify the JetNews workload to use the new jank testing classes. This allows
simplification of the code and also makes it more straightforward to implement
new workloads that also need to gather frame metrics.
2024-08-29 11:14:30 +01:00
Luis Machado
7b53b9875d [framework] Create new Jank testing classes
Create two new classes to deal with workloads for which we want to
collect frame metrics/jank percentages.

ApkUiautoJankTestWorkload inherits from ApkUiautoWorkload and instantiates
a UiAutomatorJankTestGUI gui member.

UiAutomatorJankTestGUI (inherits from UiAutomatorGUI) handles most of the
new logic for jank tests, including using a regular expression to parse the
final output.
2024-08-29 11:11:20 +01:00
Luis Machado
aa41d4d77d [framework] Undo changes to UiAutomatorGUI
Restore UiAutomatorGUI back to what it was, as we don't want to
change the existing generic code for implementing the jank test
workloads.
2024-08-29 11:10:33 +01:00
Luis Machado
94fa1be588 [framework/uiauto-androidx] Update copyright years
Update the copyright years in the headers of files to match the
year they were created.
2024-08-29 11:09:59 +01:00
Luis Machado
761cab17c9 [workload/JetNews] Update timestamp for gradle-wrapper.properties file.
Update timestamp to match date the file was created.
2024-08-29 11:09:37 +01:00
Luis Machado
9212b7f051 [workload/JetNews] Address reviewer comments
- Add JetNews workload description.
- Fixup copyright years.
- Adjust formatting.
- Add constraints to the workload's parameters.
- Fix comment typos.
- Remove unused commented-out code from app/build.gradle.
2024-07-26 15:45:51 +01:00
Luis Machado
1a308b6e39 [framework/uiauto] Revert changes to original uiauto library
We don't want to change the old uiauto library at the moment. We will
update uiauto along with each workload using it.
2024-07-26 15:42:26 +01:00
Luis Machado
b38e64a2a8 [workloads] Add JetNews jank tests workload
This patch adds the JetNews jank-testing workload. This is accomplished
through the uiauto helper library and the jank test classes.

This workload requires a JetNews app APK to be available. We plan to
make it available through the workload-automation-assets repo.

At the end of the run, users should end up with a json file containing all
the frame/jank metrics.

There are 3 parameters for this workload:

- tests: Specifies which of the 3 available tests to run (default is to run
         all of them)

- flingspeed: The speed of the fling interactions.

- repeat: How many times each of the selected tests is to be executed in a
          single measuring session.
2024-07-16 14:38:24 +01:00
Luis Machado
18d9f942da [framework/workload] Add support for jank testing
Jank testing involves using a different library (JankTestBase) that our
testing class needs to extend. Since we already make the base testing
class UiAutomation extend BaseUiAutomation, we cannot use the UiAutomation
class for our tests.

The uiauto_class property is hardcoded to "UiAutomation" though, so this
patch adds a uiauto_jank_class property for the Jank test class.

While at it, we also make the uiauto_runner configurable (currently hardcoded
to the old deprecated android.support version of it) so that our workloads
can pass whatever runner they need to use.

In terms of stages for testing, their current names are the following:

stages = ['setup', 'runWorkload', 'extractResults', 'teardown']

Those won't work for jank tests. For some reason the jank test library wants
to see the testing function name contain or start with a "test" string
pattern on it.

This behavior doesn't seem to be documented, but at least with the current
version of the JankTestBase library we have this restriction.

To make things work despite this restriction, I've added separate jank
test stages that can be provided by the workload. The generic workload
code will use these stages to generate the instrumentation invocation
command, and the provided jank test stages (essentially jank test
functions) will be invoked one by one.

Finally, we make the UiAutomatorGUI's _execute method return the output
of the execution so the workload can freely process and pattern-match
the results, like the UiBenchJankTests workload.
2024-07-16 14:30:11 +01:00
Luis Machado
510b344aa5 [framework/uiauto] Update uiauto library to move away from android.support and into androidx
Currently the uiauto library is built on top of the deprecated android.support
libraries. Create an updated uiauto library (uiauto-androidx) using androidx
and keep it alongside the old one for compatibility reasons.

As we update workload-automation going forward, we should update the workloads
to use the androidx version of uiauto.

This has been tested with the latest gradle version available at the time
(8.8).
2024-07-16 14:10:44 +01:00
Metin Kaya
412a785068 target/descriptor: Support adb_port parameter
devlib/AdbConnection class supports customizing ADB port number. Enable
that feature in WA side.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-07-11 18:55:56 -05:00
dependabot[bot]
6fc5340f2f ---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-12 17:09:04 -05:00
dependabot[bot]
da667b58ac build(deps): bump idna from 3.4 to 3.7
Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-12 17:08:15 -05:00
Elif Topuz
4e9d402c24 workloads/speedometer: Dismiss notification pop-up
When speedometer is running on a Chrome package on Android 14, a pop-up
window was showing on the screen. Chrome preferences file is modified
to dismiss the window.
2024-05-30 12:56:53 -05:00
Ola Olsson
e0bf7668b8 Adding support for not validating PMU counters 2024-04-02 14:32:30 -05:00
Fabian Gruber
4839ab354f configuration: Allow including multiple files into one mapping.
The key for 'include#' can now be either a scalar or a list.
A scalar triggers the same behaviour as before.
If the value is a list it must be a list of scalars (filepaths).
The paths will be loaded and merged in order, and finally the resulting
dict is included into the current scope.
2024-03-28 20:06:30 -05:00
Elif Topuz
b6ecc18763 workloads/speedometer: Edit regex search to get the score 2024-03-20 12:17:30 +00:00
Marc Bonnici
7315041e90 fw/uiauto: Fix uiauto builds and update apks
The version of gradle being used was out of date, update to a later
version to fix building of uiauto apks.
2024-03-20 12:17:10 +00:00
dependabot[bot]
adbb647fa7 build(deps): bump cryptography from 41.0.6 to 42.0.4
Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.6 to 42.0.4.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/41.0.6...42.0.4)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-20 12:16:59 +00:00
Metin Kaya
366f59ebf7 utils/misc: Clean duplicated code
- ``load_struct_from_yaml()`` has been moved to devlib [1].
- ``LoadSyntaxError()`` is already implemented in devlib.
- Remove ``load_struct_from_file()`` and ``RAND_MOD_NAME_LEN`` since
  they are not used at all.

[1] https://github.com/ARM-software/devlib/commit/591825834028

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-02-23 12:49:03 -08:00
dependabot[bot]
0eb17bf8f0 build(deps): bump paramiko from 3.1.0 to 3.4.0
Bumps [paramiko](https://github.com/paramiko/paramiko) from 3.1.0 to 3.4.0.
- [Commits](https://github.com/paramiko/paramiko/compare/3.1.0...3.4.0)

---
updated-dependencies:
- dependency-name: paramiko
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-09 12:24:16 -08:00
Douglas Raillard
f166ac742e utils/misc: Fix linters violation
A mix of pylint and PEP8 violations that GitHub action enforces.
2024-01-09 12:20:26 -08:00
Douglas Raillard
6fe4bce68d Remove Python 2 support
Python 2 is long dead and devlib does not support it anymore, so cleanup
old Python 2-only code.
2024-01-09 12:20:26 -08:00
Douglas Raillard
28b78a93f1 utils/misc: Replace deprecated __import__ by importlib
Use importlib.import_module instead of __import__ as per Python doc
recommendation.

This will also fix the case where the class is in a
package's submodule (since __import__ returns the top-level package),
e.g. "foo.bar.Class".
2024-01-09 12:20:26 -08:00
Douglas Raillard
77ebefba08 wa: Remove dependency on "imp" module
Python 3.12 removed the "imp" module, so use importlib instead.
2024-01-09 12:20:26 -08:00
Metin Kaya
41f7984243 fw/rt_config: Add unlock_screen config option in runtime_parameters
Introduce 'unlock_screen' option in order to help in automating Android
tests by unlocking device screen automatically. Surely this works only
if no passcode is set.

'unlock_screen' option implicitly requires turning on the screen. IOW,
it will override value of 'screen_on' option.

'diagonal', 'vertical' and 'horizontal' are valid values for
'unlock_screen' option as of now.

Note that this patch depends on
https://github.com/ARM-software/devlib/pull/659 in devlib repo.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-01-09 07:42:53 -08:00
Metin Kaya
23fcb2c120 framework/plugin: Fix typo at suppoted_targets
Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2023-12-20 08:26:13 -08:00
dependabot[bot]
e38b51b242 build(deps): bump cryptography from 41.0.4 to 41.0.6
Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.4 to 41.0.6.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/41.0.4...41.0.6)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 13:10:50 -08:00
dependabot[bot]
ea08a4f9e6 build(deps): bump urllib3 from 1.26.17 to 1.26.18
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.17 to 1.26.18.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.17...1.26.18)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 13:10:40 -08:00
Elif Topuz
5b56210d5f UIBenchJankTests:modification to support Android 14 version
"--user <USER_ID" (current user: 0) option is added to
activity manager (am) command because of "Invalid userId" command.
Tested with other benchmarks (geekbench) as well.
2023-12-04 16:23:19 -08:00
dependabot[bot]
0179202c90 build(deps): bump urllib3 from 1.26.15 to 1.26.17
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.15 to 1.26.17.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.15...1.26.17)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 16:31:02 -07:00
dependabot[bot]
617306fdda build(deps): bump cryptography from 41.0.3 to 41.0.4
Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.3 to 41.0.4.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/41.0.3...41.0.4)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 16:30:49 -07:00
Kajetan Puchalski
8d4fe9556b instruments: Add Perfetto instrument
Add an instrument that uses devlib's PerfettoCollector to collect a
Perfetto trace during the execution of a workload.
The instrument takes a path to a Perfetto config file which specifies
how Perfetto should be configured for the tracing.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2023-09-07 17:29:27 -05:00
Marc Bonnici
775b24f7a3 docs: fix RTD build
- Bump python version used when building documentation.
- `setuptools` is a deprecated installation method on RTD so switch to `pip`.
- Add additional dependency on devlib master branch as RTD env is not
  respecting dependency_links during installation.
- Bump copyright year.
2023-08-21 16:53:53 -05:00
Kajetan Puchalski
13f9c64513 target/descriptor: Expose adb_as_root for AdbConnection
Expose devlib's AdbConnection `adb_as_root` parameter in the target
descriptor.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2023-08-21 16:41:23 -05:00
Kajetan Puchalski
6cd1c60715 workloads/speedometer: Add Bromite to package names
Bromite is a fork of Chromium that's easily available for Android. Apart
from small changes it works the same as Chromium and works with this
speedometer workload. Add it to the 'package_names' list to allow using
it as an option.

https://www.bromite.org/

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2023-08-18 17:36:17 -05:00
Douglas Raillard
05eab42f27 workloads/rt-app: Update rt-app binaries
Update rt-app binaries to the latest version of the "lisa" branch in
douglas-raillard-arm GitHub fork. This tracks the upstream master branch
with a number of critical patches required notably to work with uclamp.
2023-08-15 17:50:43 -05:00
Kajetan Puchalski
b113a8b351 instruments/trace_cmd: Allow setting top_buffer_size
Allow optionally setting the top level ftrace buffer size separately
from the devlib buffer size. The parameter will be passed to the devlib
FtraceCollector and take effect there.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2023-08-15 17:50:26 -05:00
Douglas Raillard
d67d9bd2a4 fw/plugin: Try to load plugin paths as Python module name
WA_PLUGIN_PATHS currently contains a list of filesystem paths to scan
for plugins. This is appropriate for end-user plugins, but this is
problematic for plugins distributed by a 3rd party, such as a plugin
installed from PyPI.

In those cases, the path to the sources is unknown and typically depends
on the specify Python version, local setup etc. What is constant is
Python name of the package, e.g. "lisa.wa.plugins".

Extend the input allowed in WA_PLUGIN_PATHS by trying to load entries as
a Python package name if:
    * There is no filesystem path with that name
    * The entry is a "relative path" (from an fs point of view)
2023-08-14 19:23:56 -05:00
Kajetan Puchalski
11374aae3f worklads/drarm: Set view for FPS instrument
Set the view parameter so that the FPS instrument can collect frame data
from the workload.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2023-08-14 19:15:05 -05:00