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

873 Commits

Author SHA1 Message Date
Sergei Trofimov
3f87f3ab07 utils/misc: remove enum_metaclass
It is unused and has been obsoleted by enum type in utils/types.
2017-08-09 15:59:20 +01:00
Sergei Trofimov
a9959550af utils/types: better enum class member setting
- What used to be enum.values is now enum.levels.
- Add enum.names and enum.values that are lists of enum's levels' names
  and values respectively.
- Add a check on creation to make sure that provided level names do not
  conflict with the atomatically created members.
2017-08-09 15:59:20 +01:00
Sergei Trofimov
8d27b50a7c tests: add tests documenting enum behavior
Add tests that exercising various ways of creating and using WA enums.
2017-08-09 14:56:32 +01:00
marcbonnici
7f21cc6009 Merge pull request #448 from setrofim/next
cpufreq: rename get_domain_cpus
2017-07-26 15:05:45 +01:00
Sergei Trofimov
5e0ff6aa51 cpufreq: rename get_domain_cpus
get_domain_cpus() got renamed to get_related_cpus() in devlib to reflect
the cpufreq nomenclature. This commit makes corresponding changes in WA.
2017-07-26 14:58:46 +01:00
setrofim
531dcfbb1b Merge pull request #447 from marcbonnici/energy_measurement
Energy measurement
2017-07-25 16:22:18 +01:00
Marc Bonnici
c455ad524f Parser: Fixes raising duplicate entry error. 2017-07-25 16:08:17 +01:00
Marc Bonnici
af49c5020f Instrumentation/Misc: Fixed using 'target' instead of 'device' 2017-07-25 16:08:17 +01:00
Marc Bonnici
e9a9f16032 EnergyMeasurement: Adds a wrapper for devlib instrumentation
The instrument allows for various devlib instruments (currently only
daq and energy_probe) to be used in WA to collect energy measurements.
2017-07-25 16:08:17 +01:00
setrofim
e67b77e22b Merge pull request #442 from marcbonnici/apk_resolution
Apk resolution
2017-07-20 14:33:55 +01:00
Marc Bonnici
f8e4d34e60 APKResolution: Uses loose version matching
Allows for more flexible version matching  e.g. specifying a
version of 4, 4.3, 4.3.1 will all resolve to an apk version of 4.3.1
2017-07-20 14:30:52 +01:00
Marc Bonnici
c722a6a73c ApkResolution: Now takes into account apk abi when resolving.
Previously any apk found would be selected even if the abi did not match
the device, now an apk is only selected if it is compatible with the
device. Additionally the 'exact_abi' parameter has been added to allow only
selecting an apk if a devices primary abi's native code is present in
the apk, or there is no native code.
2017-07-20 14:30:52 +01:00
Marc Bonnici
5ef3d7673f Getters: Fixes raising error instead of returning. 2017-07-14 18:09:01 +01:00
Marc Bonnici
d76c78f3f6 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.
2017-07-11 15:33:21 +01:00
setrofim
61a44dd91d Merge pull request #434 from marcbonnici/next_uiauto2
Next: Fixes and uiauto2 workloads
2017-07-10 11:28:31 +01:00
Marc Bonnici
3382036d6e Vellamo: Ported workload to WA3 2017-07-10 11:18:32 +01:00
Marc Bonnici
b6cc845272 Youtube: Adds workload to WA3 2017-07-10 11:18:32 +01:00
Marc Bonnici
d015cce91e BenchmarkPi: Updated for uiauto2 refactor 2017-07-10 11:08:44 +01:00
Marc Bonnici
9284472d8b BaseUiAutomator: Ports additional functionality
Ports required functionality from WA2 for new workloads.
2017-07-10 11:08:44 +01:00
Marc Bonnici
d518328334 Uiauto: Removed reference to wlauto 2017-07-10 11:08:44 +01:00
Marc Bonnici
f9bc0261bf AndroidWorkload: Adds support for apk replacement/downgrading
Now tries to replace and downgrade an apk if already installed.
2017-07-10 11:08:44 +01:00
Marc Bonnici
4d397ab465 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-07-10 11:08:43 +01:00
Marc Bonnici
27b488cc56 Jobs: Fixes job initialize/finalize
Previously initialize and finalize were being called for each iteration
of each workload at the start/end of the run which is incorrect
behaviour. To prevent this, each iteration of a workload now shares a
single instance of the workload combined with the 'once_per_instance' decorator
to ensure that the methods are only invoked once per set of workload
runs.
2017-07-10 11:08:43 +01:00
Marc Bonnici
91c49d9e95 ExecControl: Fixes bug with inheritance
Previously there was no differentiation between the same method at different
inheritance levels, therefore using the once_per_instance_decorator with super call would
prevent the super call from executing as they were considered the same
instance.
2017-07-10 11:08:43 +01:00
Marc Bonnici
3a376525cd PluginCache: Fixed Typo 2017-07-10 11:08:43 +01:00
Marc Bonnici
5232bc3504 Workload: Move gui deployment into setup
Ensures that the correct workload gui is deployed before each iteration.
2017-07-10 11:08:43 +01:00
Marc Bonnici
0b245ac2c8 Workload: Move package initialization into setup
To support runs that require different versions of an application
the discovery/installation process should be performed at the beginning
of each iteration and therefore has been moved into setup.
2017-07-10 11:08:43 +01:00
Marc Bonnici
0317604481 Workload: Moved uiauto command initialization to setup
In order to be able to pass the package name of the app under test to
the instrumented test, the generation of the uiautomator commands needed
to be postponed until after the apk resolution had been performed.
2017-07-10 11:08:43 +01:00
Marc Bonnici
d6f18466c9 Workload: Makes APK starting activity optional
The starting activity is not always listed in an apk or required to start
an application to its default state, for example youtube. Therefore now the
starting activity will only be used if one is available.
2017-07-10 11:08:43 +01:00
Marc Bonnici
1b93a4162b Workload: Updated to use a ParameterDict
In order to pass arguments to the instrumented test via the command line
they need to be encoded, this commit utilises a ParamDict to ensure
parameters are encoded correctly before passing them as arguments.
2017-07-10 11:08:43 +01:00
Marc Bonnici
85218a10d2 Types: Adds ParameterDict Type
Acts like a regular dictionary however will automatically url
encode/decode the data along with relevant type information.
2017-07-10 11:08:43 +01:00
marcbonnici
e884c3bcca Merge pull request #424 from setrofim/agenda-fix
AgendaPaser: fix duplicate source error
2017-06-27 10:46:04 +01:00
marcbonnici
b4363e401c Merge pull request #421 from setrofim/next
types: make enum levels serializable
2017-06-27 10:45:54 +01:00
Sergei Trofimov
d68bc49427 AgendaPaser: fix duplicate source error
When both global and config sections are present in an agenda, they both
will be processed by the ConfigManager. In each case, the path to the
agenda file was specified as the source, which resulted ConfigManager
complaining that the same source is being added twice. To avoid that,
the source is now suffixed with the section name.
2017-06-27 10:03:13 +01:00
setrofim
a7bed9980e Merge pull request #423 from AnthonyARM/pull/typo_fix
Fixed several typos in runtime_config.py file
2017-06-27 09:21:12 +01:00
Anthony Barbier
5c4aa76622 Fixed several typos in runtime_config.py file 2017-06-27 09:18:34 +01:00
Sergei Trofimov
5b3d7af62e types: make enum levels serializable
Add to/from_pod implementations to level, so that it may be serialized
properly. In order to make sure that serialization is a reversible
operation, ensure that the level value is numeric.
2017-06-26 09:13:30 +01:00
setrofim
399efb8474 Merge pull request #408 from marcbonnici/next_uiauto2
Updated apk workload mechanism and support for uiautomator 2
2017-06-21 08:53:04 +01:00
Marc Bonnici
8cf6051db8 TargetManager: Fixed Typo 2017-06-15 17:49:57 +01:00
Marc Bonnici
ec8d75ef4c TargetManager: Updated to allow failure of onlining cpus
Before performing feature discovery on a device, all cores are attempted to be
onlined, however due to power management on some phones, cores can be immediately
hotplugged out again therefore causing the command to file. This commit now just
logs a message to warn that the online process failed and the information obtained
from a device may be incomplete.
2017-06-15 17:49:57 +01:00
Marc Bonnici
d7dcbcae92 RuntimeConfig: Handle initialisation failure of RT plugin
Previously if one of the runtime parameters failed to initialize it would cause
the the entire setup process to fail. Now if an error is encountered e.g. a core
went offline when trying to read its information, that particular parameter will
be disabled along with it's supported parameters. This means that only if a user
attempts to use the RT parameter will execution be stopped however it will raise
a potentially misleading unsupported parameter error.
2017-06-15 17:49:57 +01:00
Marc Bonnici
279ed6a2c9 Workload: Splits ApkUIWorkload into ApkWorkload
This commit removes the UI elements from ApkUIWorkload to provide a base
ApkWorkload class in order to support workloads that do not require a GUI.
It also remove the `@once` decorator as apk resolution may need to be
run more than once per run.
2017-06-15 17:48:58 +01:00
Marc Bonnici
3662686b3f Core: Misc formatting fixes 2017-06-15 17:44:41 +01:00
Marc Bonnici
e186056182 Workload: Adds workload parameters for APKHandler
Now accepts parameters which can be used to determine which apk is to be used
and to control the apk installation procedure.
2017-06-15 17:44:41 +01:00
Marc Bonnici
8e5fd929e2 Core: Fixes error message for invalid config
Previously only an incorrect error message was generated without actually being
raised.
2017-06-15 17:44:41 +01:00
Marc Bonnici
6571d012c2 BenchmarkPi: Added default package name list 2017-06-15 17:44:41 +01:00
Marc Bonnici
4523fb74b6 Workload: Fixes apk resolution when not present on host.
Previously apk resolution would fail if the application apk was not present on
device as this was used to retrieve information e.g. the package name. To work
around this, the resolution process now supports searching the device for either
a list of package names retrieved from the workload or as a parameter passed by
the user at runtime and if found on the device will be pulled to the host to
perform its analysis.
2017-06-15 17:44:41 +01:00
Marc Bonnici
0c3e1c2526 Workload: Renamed ApkHander to PackageHandler 2017-06-12 14:57:55 +01:00
Marc Bonnici
037f0aac41 Resource: Add support for matching apks on package name 2017-06-12 14:57:55 +01:00
Marc Bonnici
238ae18491 Resource: Added support for uiautomator apks
As uiautomator2 uses apk for instrumented tests this allows for distinguishing
between a normal application apk and a uiauto test apk based on the apks package
name.
2017-06-12 14:57:55 +01:00