1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

1139 Commits

Author SHA1 Message Date
Kajetan Puchalski
bf72a576e6 uibenchjanktests: Rework to allow listing subtests
Rework the uibenchjanktests workload to allow specifying a list of
subtests. The activity will be re-launched for each provided subtest. If
none are specified, all available tests will be run in alphabetical order.

The workload output will now include metrics with their respective test
names as classifiers.

Add a 'full' parameter to revert back to the old default 'full run'
behaviour with restarts between subtests.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2023-06-30 12:29:21 -05:00
Kajetan Puchalski
951eec991c drarm: Add DrArm workload
Add a workload for the Dr Arm demo app. Includes functionality for
automatically pulling the ADPF FPS report file from the target if one
was generated by the app.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2023-06-08 12:38:13 -05:00
Kajetan Puchalski
88b085c11b perf: Fix instrument for Android 13
The simpleperf included with Android 13 now does not show the percentage
when no counter multiplexing took place. This causes the perf instrument
to crash when processing the output. This fix checks whether the percentage
exists before trying to extract it.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
2023-05-30 17:38:09 -05:00
Marc Bonnici
36a909dda2 fw/ApkWorkload: Allow workloads to provide apk arguments
In some workloads it is beneficial to be able to provide arguments
when launching the required APK. Add a new `arpk_arguments` property
to allow a workload to provide a dict of parameter names and values
that should be used when launching the APK.

The python types of the parameters are used to determine the data
type provided to the APK. Currently supported types are string, bool,
int and float.
2023-04-29 17:54:41 -05:00
Marc Bonnici
3228a3187c Mitigate CVE-2007-4995
Prevent potential directory path traversal attacks (see
https://www.trellix.com/en-us/about/newsroom/stories/research/tarfile-exploiting-the-world.html)
2023-04-29 17:35:54 -05:00
Marc Bonnici
5e0c59babb version: Bump minor version number
Bump the minor version to prepare for dropping Python < 3.7 support.
2023-04-29 17:29:43 -05:00
Marc Bonnici
dc2fc99e98 fw/version: Bump release versions 2023-04-29 17:29:43 -05:00
Marc Bonnici
61bb162350 workloads/gmail: Update workload to latest apk version
The Google services required in the old apk appear to no
longer be avaliable. Update to support a newer version.
2023-04-29 17:29:43 -05:00
Marc Bonnici
d1e960e9b0 workloads/googleplaybooks: Fix ui match
The resource id of the book list cannot always be discovered, search
for the only scrollable list instead.
2023-04-29 17:29:43 -05:00
Marc Bonnici
29a5a7fd43 fw/config: Fix RunConfiguration descriptions
Fix quotations in the RunConfiguration description.
2023-04-29 17:29:43 -05:00
Marc Bonnici
37346fe1b1 instruments/trace_cmd: Handle setup failure
In the case that the trace_cmd collector fails to
initialise, do not attempt to use the collector in
subsequent methods.
2023-04-29 17:29:43 -05:00
Kajetan Puchalski
40a118c8cd geekbench: Add support for Geekbench 6
Add support for Geekbench 6 as a workload on Android.
This commit adds 6.*.* as a valid version for the Geekbench workload and
updates the UIAuto apk accordingly.

It also refactors the update_result function seeing as the one
originally used for GB4 can now be used for 4, 5 and 6 and so it makes
more sense to treat it as a 'generic' update_result function. The
functionality should stay the same.

Backwards compatibility with GB2 & GB3 should be maintained.
2023-03-06 19:28:40 -06:00
Steven Schaus
a3eacb877c Load RuntimeConfig from plugins
Implements support for dynamically loading additional RuntimeConfig
and associated RuntimeParameter that are defined in a plugin.

Currently, the various RuntimeConfig's are hard coded in a list within
WA. This patch extends RuntimeParameterManager to use PluginLoader to
load RuntimeConfig classes and append to the hard coded list.

The implementation, as written, does not allow loading RuntimeConfig
from a plugin if it has the same name as one of the hard coded
RuntimeConfig. This is meant to prevent conflicts and unexpected
behavior.
2022-12-08 09:26:29 +00:00
Kajetan Puchalski
48152224a8 schbench: Add support for schbench
Add support for running schbench as a workload.
Includes the arm64 binary for use on Android devices.
2022-08-23 12:54:57 +01:00
Kajetan Puchalski
b0f9072830 perf: Fix processing simpleperf stats
Currently, when processing the output of 'simpleperf stat', wa does not
skip the header and tries to process part of it as a number, leading
to type errors. This change skips the header (line starting with '#').

Furthermore, some events (e.g. cpu-clock or task-clock) include "(ms)"
in their count value and are floats instead of integers. Because of
this, when either of those is included, processing metrics fails due to
assuming every metric is an integer. Then another error happens when the
code tries to split the line on '(' assuming that there's only one set
of those around the percentage.

This change removes "(ms)" from the line
before it's processed and properly determines whether 'count' is an
integer or a float before attempting to convert it.
2022-08-08 11:04:13 +01:00
Qais Yousef
b109acac05 geekbench: Add/fix support for Geekbench5
The non corporate version of geekbench5 didn't work although the code
had everything needed, except for a number of tiny required tweaks:

1. Add '5' in the supported versions in __init__.py
2. Fix the name of the android package in__init__.py and
   UiAutomation.java
3. Improve handling of minorVersion to fix potential exception when we
   don't specify the minorVersion number in the yaml file. Launching
   geekbench5 works fine when it's the only one installed. But if you
   have multiple versions, then using the version string in the yaml
   agenda didn't like specifying '5' as the version and threw exception
   out of bound because we assume '5.X' as input. No reason I'm aware of
   to force support for a specific version of geekbench5. So keep it
   relaxed until we know for sure it breaks with a specific version.

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
2022-03-01 08:25:52 +00:00
Qais Yousef
9c7bae3440 gfxbench: Update uiauto APK
To support the new corporate version change.

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
2022-03-01 08:25:35 +00:00
Qais Yousef
7b5ffafbda gfxbench: Add a non corporate version
Which works as the corporate version except for a different in package
name and a set of Fixed Time Tests that don't exist on free version.

Only support v 4.X and v5.X as that's what's available.

Note there's a clash with glbenchmark package name. glbenchmark is an
ancient version provided by the same developers but was superseded by
gfxbench.  The version checks in both workloads should ensure we get the
right one in the unlikely case both are installed.

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
2022-03-01 08:25:35 +00:00
Qais Yousef
be02ad649c pcmark: Update uiauto APK
To include the new fix for the long delays to start the run.

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
2022-03-01 08:25:35 +00:00
Qais Yousef
5a121983fc pcmark: Check for description instead of text in installbenchmark
The test was hanging for a long time waiting for RUN text. Checking for
description first prevents that.

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
2022-03-01 08:25:35 +00:00
Peter Collingbourne
4bad433670 Add support for Antutu 9.1.6.
The code for reading the results is almost the same as for Antutu 8,
but it needs to be adjusted to account for a slightly different set
of benchmarks.

At least on my device, Antutu 9 takes over 10 minutes to run, so increase
the timeout to 20 minutes.
2021-10-04 09:12:08 +01:00
Peter Collingbourne
0b558e408c Upgrade Gradle to 7.2 and Android Gradle plugin to 4.2.
The older versions of the plugin caused problems building with newer
NDK versions due to a lack of MIPS support.

This also required upgrading to a version of Gradle that knows about
the Google Maven repository.
2021-09-29 09:46:51 +01:00
Kajetan Puchalski
06b508107b workloads/pcmark: Add PCMark 3.0 support
Add support for PCMark for Android version 3.
Use a 'version' Parameter to maintain support for v2.
2021-07-19 11:06:11 +01:00
Javi Merino
789e150b0a perf: report a config error if stat is combined with report options
When running perf/simpleperf stat, the report_option_string,
report_sample_options and run_report_sample configuration parameters
don't make sense.  Instead of quietly ignoring them, raise a
ConfigError so that the user can fix the agenda.
2021-04-30 13:35:08 +01:00
Javi Merino
43cb80d854 perf: support report-sample
devlib learnt to use report-sample in
ARM-software/devlib@fe2fe3ae04 ("collector/perf: run simpleperf
report-sample in the target if requested").  Adapt the perf instrument
to use the new parameters of the PerfCollector.
2021-04-30 13:35:08 +01:00
Stephen Kyle
72298ff9ac speedometer: address pylint complaints 2021-04-08 14:34:44 +01:00
Stephen Kyle
f08770884a speedometer: fix @once methods which declare attributes
We need to make those attributes class-attributes, to make sure they are still
defined in subsequent jobs. We still access them through 'self', however.
2021-04-08 14:34:44 +01:00
Stephen Kyle
a5e5920aca speedometer: ensure adb reverse works across reboots
Before this patch, if you used reboot_policy: "each_job", the adb reverse
connection would be lost.
2021-04-08 14:34:44 +01:00
Marc Bonnici
5558d43ddd version: Bump required devlib version 2021-04-07 18:26:38 +01:00
Marc Bonnici
c8ea525a00 fw/target/info: Utilise target properties
Use hostname and hostid target properties instead
of existing calls.
2021-04-07 18:26:38 +01:00
Marc Bonnici
4b54e17020 fw/job: Fix workload cache check
Don't assume the first job iteration is already in the workload cache.
This may not always be the case, for example with the random execution
order a later iteration can be processed first.
Instead check to see if the job id is present or not.
2021-02-01 18:00:34 +00:00
Marc Bonnici
da4d10d4e7 fw/rt_config: Avoid querying online cpus if hotplug disabled
If the device does not have the hoptplug module installed, avoid
unnecessary querying of the device to check the number of cpus which
can cause issues with some devices.
2021-01-29 18:19:48 +00:00
Marc Bonnici
e4be2b73ef fw/version: Prevent installation failure on systems without git
On systems that do not have git installed WA will currently fail
to install with a FileNotFound Exception. If git is not present then
we will not have a commit hash so just ignore this error.
2021-01-12 17:53:46 +00:00
Javi Merino
22750b15c7 perf: correctly parse csv when using "--csv --interval-only-values"
With the perf instrument configured as:

    perf:
      perf_type: simpleperf
      command: stat
      optionstring: '-a --interval-only-values --csv'

WA fails to parse simpleperf's output:

    INFO             Extracting reports from target...
    ERROR            Error in instrument perf
    ERROR              File "/work/workload_automation/workload-automation/wa/framework/instrument.py", line 272, in __call__
    ERROR                self.callback(context)
    ERROR              File "/work/workload_automation/workload-automation/wa/instruments/perf.py", line 142, in update_output
    ERROR                self._process_simpleperf_output(context)
    ERROR              File "/work/workload_automation/workload-automation/wa/instruments/perf.py", line 155, in _process_simpleperf_output
    ERROR                self._process_simpleperf_stat_output(context)
    ERROR              File "/work/workload_automation/workload-automation/wa/instruments/perf.py", line 233, in _process_simpleperf_stat_output
    ERROR                self._process_simpleperf_stat_from_csv(stat_file, context, label)
    ERROR              File "/work/workload_automation/workload-automation/wa/instruments/perf.py", line 245, in _process_simpleperf_stat_from_csv
    ERROR                context.add_metric('{}_{}'.format(label, row[1]), row[0], 'count', classifiers=classifiers)
    ERROR              File "/work/workload_automation/workload-automation/wa/framework/execution.py", line 222, in add_metric
    ERROR                self.output.add_metric(name, value, units, lower_is_better, classifiers)
    ERROR              File "/work/workload_automation/workload-automation/wa/framework/output.py", line 142, in add_metric
    ERROR                self.result.add_metric(name, value, units, lower_is_better, classifiers)
    ERROR              File "/work/workload_automation/workload-automation/wa/framework/output.py", line 390, in add_metric
    ERROR                metric = Metric(name, value, units, lower_is_better, classifiers)
    ERROR              File "/work/workload_automation/workload-automation/wa/framework/output.py", line 653, in __init__
    ERROR                self.value = numeric(value)
    ERROR              File "/work/workload_automation/devlib/devlib/utils/types.py", line 88, in numeric
    ERROR                raise ValueError('Not numeric: {}'.format(value))
    ERROR
    ERROR            ValueError(Not numeric: Performance counter statistics)

With the above options, the csv that simpleperf produces looks like
this:

    Performance counter statistics,
    123456789,raw-l1-dtlb,,(60%),
    42424242,raw-l1-itlb,,(60%),
    Total test time,1.001079,seconds,
    Performance counter statistics,
    123456789,raw-l1-dtlb,,(60%),
    42424242,raw-l1-itlb,,(60%),
    Total test time,2.001178,seconds,
    Performance counter statistics,
    [...]

That is, with "--interval-only-values", the "Performance counter
statistics," header is repeated every interval.  WA current expects
it only in the first line.  Modify the condition so that it is ignored
every time we find it in the file and not just the first time.
2021-01-11 17:48:27 +00:00
Marc Bonnici
e3703f0e1e utils/doc: Fix display of Falsey default parameters
Explicitly check for is `None` to determine if a default value is
not present or just a Falsey value.
2021-01-11 15:32:34 +00:00
Marc Bonnici
c5e3a421b1 fw/version: Dev version bump 2020-12-11 16:43:12 +00:00
Marc Bonnici
0e2a150170 fw/version: Bump release versions 2020-12-11 16:31:13 +00:00
Marc Bonnici
dd07d2ec43 workloads/speedometer: Fix markdown formatting in docstring 2020-12-11 16:26:49 +00:00
Marc Bonnici
c2725ffaa2 fw/uiauto: Update to handle additional permissions screen
On the latest version of android (currently Q) for applications that
are designed to run on older versions of android, an additional
screen asking to confirm the required permissions can popup.
Enable confirming of the granted permissions.
2020-12-10 15:57:30 +00:00
Marc Bonnici
ae1bc2c031 fw/config: Add additional run_completed reboot policy
Add an additional `run_completed` reboot policy for when a run
has finished.
This complements the `initial` reboot policy and aims to leave
the device in a fresh state after WA has finished executing.
2020-12-09 07:48:20 +00:00
Marc Bonnici
91b791665a workloads/googleplaybooks: Update to handle updated IDs
Resourceid and classes have been modified so update the
workload to handle these cases.
Additionally on some devices regex matches appear to fail
so workaround to match separately.
2020-11-29 19:42:30 +00:00
Marc Bonnici
62c4f3837c workloads/googleslides: Update to accommodate newer versions
Add support for newer version of the apk.
Also add support for differing screen sizes, on larger devices
the direction of swipe to change slide differs, perform both
horizontal and vertical swipes to satisfy both layouts.
2020-11-29 19:42:30 +00:00
Marc Bonnici
3c5bece01e workloads/aitutu: Improve reliability of results extraction
Wait for the device to become idle before attempting to extract
the test scores.
2020-11-29 19:42:30 +00:00
Marc Bonnici
cb51ef4d47 workloads/googlephotos: Update to handle new popup
Bump the minor known working version APK and handle a new "missing out"
popup.
2020-11-29 19:42:30 +00:00
Marc Bonnici
8e56a4c831 utils/doc: Fix output for lambda function
The "name" can be in the format "<class>.<lambda>" so
update to allow correct function with the updated format.
2020-11-13 16:27:39 +00:00
Marc Bonnici
76032c1d05 workloads/rt_app: Remove timeout in file transfer
Remove the explict timeout when pushing to the device.
Allow the polling mechanims to monitor the transfer if required.
2020-11-13 15:42:00 +00:00
Marc Bonnici
4c20fe814a workloads/exoplayer: Remove timeout in file transfer
Remove the explict timeout when pushing a media file to the device.
Allow the polling mechanims to monitor the transfer.
2020-11-13 15:42:00 +00:00
Marc Bonnici
92e253d838 workloads/aitutu: Handle additional popup on launch
Allow agreeing to an updated Terms agreement on launch
2020-11-13 11:31:50 +00:00
Marc Bonnici
18439e3b31 workloads/youtube: Update Youtube workload
The previous known working version of the youtube apk appears
to have stopped working. Update to support the new format.
2020-11-12 15:03:01 +00:00
Marc Bonnici
5cfe452a35 fw/version: Bump dev version.
We are relying on a newly available variable in devlib
so bump the version to remain in sync.
2020-11-09 17:56:16 +00:00