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

416 Commits

Author SHA1 Message Date
Marc Bonnici
adb14442c8 utils/doc: Change get_params_rst to be more flexible
Instead of taking an extension as a parameter and assuming there it has
an attribute 'parameters' instead take a list of parameters directly
which allows the method to be used with parameter lists with different
names.
2017-12-14 09:50:26 +00:00
Marc Bonnici
6df498b4bd framework/workload: Fix path of deployed asset
Get pushed file basename to ensure the assets deployed path is correct.
2017-12-14 08:15:39 +00:00
Sergei Trofimov
f498f0acdc wa: export RunOutput and discover_wa_outputs
Export RunOutput and discover_wa_outputs from the main __init__.py
allowing them to be directly imported from wa.
2017-12-13 15:55:38 +00:00
Sergei Trofimov
d1a42f6e64 framework/output: add discover_wa_outputs
Add a function that traverses a directory structure looking for WA
output directory and yielding corresponding RunOutput objects.
2017-12-13 15:55:38 +00:00
Sergei Trofimov
bb9f735cd4 framework/target: assistant: fix import
Import Parameter from the module that defines it rather than from wa to
avoid circular import errors.
2017-12-13 15:55:38 +00:00
Sergei Trofimov
c1319ce8cb framework/output: load jobs on RunOutput creation
Populate RunOutput's jobs attribute with job outputs on its creation.
2017-12-13 15:55:38 +00:00
Sergei Trofimov
4a239790d2 framework/output: add target_info to RunOutput
Make TargetInfo an attribute of run output, replacing the read/write
methods for the targetfile. Instead, always load it on creation, if
targetfile exists (useful for external scripts), and have a method to
set it after creation (uselful during WA run, where the output is
created before connecting to the target).
2017-12-13 15:55:38 +00:00
Sergei Trofimov
3ab0aa04de framework/target: fix TargetInfo deserialization
Fix TargetInfo.from_pod(). As part of creating the POD, some of devlib's
classes such as Cpuinfo, get serialized. Since they are from devlib,
they do not implement WA's serialization interface, and are instead
serialized by extracting their internal structures. They are then not
deserialized properly, since their __init__'s expect text rather than
parsed structures.

This implements deserialization functions for these classes which
initialize them properly from TargetInfo POD.
2017-12-13 15:55:38 +00:00
Sergei Trofimov
f9df5195b9 instrument/energy: add support for Juno on-board measurement
Add support for JunoEnergyInstrument backend that utilizes the on-board
Juno sensors.
2017-12-12 10:07:04 +00:00
Sergei Trofimov
ed691a5335 framework/target: add shell_prompt target param.
Add a Parameter to specify a regex that matches the shell prompt on the
target. This used in establishing serial tty connections (e.g. VExpress
UART).
2017-12-12 10:07:04 +00:00
Sergei Trofimov
e0fd44ed6b processors: add targz processor
Add an output processor to create a tarball of WA output directory.
2017-12-11 10:07:21 +00:00
Marc Bonnici
7a8492031e commands/workload_templates: Fix validate method in template
Remove incorrect parameter for super 'validate' call.
2017-12-11 08:04:49 +00:00
Marc Bonnici
6308f99b9d commands/revent: Fix revent for non android based workloads
Previously recording an revent workload would assume an android based
revent workload with an apk. Now only deploy apk if present for
workload.
2017-12-11 08:04:49 +00:00
Sascha Bischoff
45738dfffe workloads/dhrystone: Remove trailing whitespace 2017-12-08 10:46:29 +00:00
Sascha Bischoff
3544b716d2 workloads/dhrystone: do initialize/finalize once per run
Add in the "once" decorator for the initialize and finalize methods to
ensure that they only run once per run.
2017-12-08 10:46:29 +00:00
Sergei Trofimov
4069e37f6b workloads/dhrystone: fix run with num loops and delay
Fix output when running for a specified number of loops (rather than
duration) and adding delay to threads. Previously, the output for the
last thread was not printed due to a missing check for a negative
duration.
2017-12-08 09:39:40 +00:00
Marc Bonnici
5729df0a5b instrumentaion/file_poller: Port instrument from WA2 2017-12-08 08:51:16 +00:00
Marc Bonnici
6022c38ae2 commands/revent: Fix revent command
Update revent commands to supply output directory when creating
TargetManager and fix ignoring any additional device config provided.
2017-12-08 08:40:38 +00:00
Marc Bonnici
0d45fa3b27 Revert "DO NOT MERGE: stub out broken method"
This reverts commit 7a3503775d.
2017-12-07 15:45:38 +00:00
Brendan Jackman
07243740d6 framework/plugin: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
56674aa3a9 framework/plugin: Satisfy pylint's nitpicks 2017-12-07 15:37:49 +00:00
Brendan Jackman
feabecd19d framework/workload: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
69f52f3359 framework/workload: Remove unused imports 2017-12-07 15:37:49 +00:00
Brendan Jackman
d8a44adde8 framework/run: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
c8d1b0e4fb framework/job: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
8032abc805 framework/run: Store RunInfo attributes from constructor 2017-12-07 15:37:49 +00:00
Brendan Jackman
3337cd477e framework/run: Whitespace 2017-12-07 15:37:49 +00:00
Brendan Jackman
cf67a7784c framework/getters: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
4d7b76fd98 framework/getters: Whitespace 2017-12-07 15:37:49 +00:00
Brendan Jackman
b05b0a2e4f framework/output: Whitespace 2017-12-07 15:37:49 +00:00
Brendan Jackman
7a3503775d DO NOT MERGE: stub out broken method 2017-12-07 15:37:49 +00:00
Brendan Jackman
b5ac669994 framework/output: Fix checking artifact kind
Don't construct an ArtifactType in Output.Add_artifact, the Artifact
class does that for us.

Next, fix the use of a nonexistent attribute Artifact.valid_kinds
2017-12-07 15:37:49 +00:00
Brendan Jackman
3904096257 framework/plugin: Whitespace 2017-12-07 15:37:49 +00:00
Brendan Jackman
6fc247a8fd framework/output: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
664f0a8905 framework/config: Whitespace 2017-12-07 15:37:49 +00:00
Brendan Jackman
81d4587da3 framework/output: Whitespace 2017-12-07 15:37:49 +00:00
Brendan Jackman
aec9a4b6fc framework/host: Add missing import 2017-12-07 15:37:49 +00:00
Brendan Jackman
6f59f8eb1b framework/agenda: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
5a373e6c7b framework/host: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
b861ca986a framework/host: Whitespace 2017-12-07 15:37:49 +00:00
Brendan Jackman
33e5eae887 framework/entrypoint: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
f935c48d47 framework/execution: Add basic docstring for Runner class 2017-12-07 15:37:49 +00:00
Brendan Jackman
e3ae7fc906 framework/entrypoint: Whitespace 2017-12-07 15:37:49 +00:00
Brendan Jackman
79ea06044b framework/execution: Calm pylint 2017-12-07 15:37:49 +00:00
Brendan Jackman
20be13282b framework/execution: Remove more unused imports
autoflake didn't find these ones, I guess because of the brackets.
2017-12-07 15:37:49 +00:00
Brendan Jackman
aae4b465bb Remove trainling newlines
Calms pylint down
2017-12-07 15:37:49 +00:00
Brendan Jackman
aa2abd16a3 Run autoflake to remove unused imports & variables 2017-12-07 15:37:49 +00:00
Marc Bonnici
b85098d5b2 framework/entrypoint: Fix help information for subcommands
Previously only the top level help message would ever be displayed,
this was caused by 'parse_known_commands' automatically displaying the
default help message and exiting before any of the custom plugins are
loaded. Now ensure this flag is never passed into the method.
2017-12-06 17:05:52 +00:00
Marc Bonnici
bfb9dd2c43 Commands/Create: Adds support for creating workloads
The create command can now be used to create workloads for the various
types.
2017-12-06 17:05:52 +00:00
Marc Bonnici
0225b76562 CreateCommand: Fix missing import 2017-12-06 17:05:52 +00:00
Sergei Trofimov
7796dabe90 framework: remove wa.framework.plugin.Artifact
Remove wa.framework.plugin.Artifact and associated references. The name
of the class clashes with the class from output and can potentially
cause confusion.

The original intention for this was to be an "expected artifact
descriptor" of sorts that plugins can specify for validation purposes,
but that functionality was never implemented. Given that the framework
has undergone significant changes since this was implemented, it's not
clear that this is the best way to go about the original goal.

Therefore remove this for now.
2017-12-06 16:25:54 +00:00
Marc Bonnici
698c61b0a5 framework/workload: Adds support for gui only workloads
Adds new workload types to allow for using a gui without requiring an
apk file.
2017-11-30 17:17:18 +00:00
Marc Bonnici
0f28a07476 framework/workload: Rename ReventWorkload to ApkReventWorkload
To reflect that the current implementation of ReventWorkload uses an APK
file on the device the name has been changed appropriately and the
relevant workloads have been updated.
2017-11-30 17:17:18 +00:00
Sergei Trofimov
0778766c8b framework/target: add adb_name alias
Add "adb_name" alias for "device" parameter of AdbConnection in order to
be backwards-compatible with WA2.
2017-11-29 13:19:39 +00:00
Sergei Trofimov
31e08bf797 framework/target: handle aliases
- Use get_config_point_map() to ensure aliases are parsed from
  configuraiton.
- Only set the default for a name only if it matches the corresponding
  param's name (i.e. don't set for alises).
2017-11-29 13:19:39 +00:00
Sergei Trofimov
a7a5d09dfa framework/config: plug_cache: handle aliases
Use get_config_point_map() when returning parameter mappings to ensure
aliases are included.
2017-11-29 13:19:39 +00:00
Sergei Trofimov
78a569a2d3 framework/config: add get_config_pont_map()
Add a function to generate a dict mapping names and aliases to
corresponding configuration point objects.
2017-11-29 13:19:39 +00:00
Marc Bonnici
07aa56f3bd GooglePhotos: Remove unnecessary method parameter 2017-11-28 08:12:31 +00:00
Marc Bonnici
b42a6a67af Gmail: Port Gmail Workload from WA2 2017-11-28 08:12:31 +00:00
Marc Bonnici
0786c25db5 GooglePlayBooks: Add support for applaunch 2017-11-28 08:12:31 +00:00
Marc Bonnici
247650141b GooglePhotos: Add support for applaunch 2017-11-28 08:12:31 +00:00
Marc Bonnici
e61ba8ed84 AdobeReader: Add support for Applaunch 2017-11-28 08:12:31 +00:00
Marc Bonnici
9f8cf2a40e Applaunch: Port workload from WA2
The report_results parameter has been removed as the parsing functionality
is now performed by the `uxperf` processor therefore to report the
results of the application launch time ensure the processor has been
enabled.
2017-11-28 08:12:31 +00:00
Marc Bonnici
6cc4021017 Framework/Uiauto: Add support for Applaunch 2017-11-28 08:12:31 +00:00
Marc Bonnici
ac5741136d Framework/Workload: Fix super propagation.
Previously super calls were not being propagated correctly so either
call the relevant super or remove the empty methods.
2017-11-28 08:12:31 +00:00
Marc Bonnici
74347b9e67 Framework/Workload: Change condition for pushing assets
Changes from checking if there are deployable assets to checking for
discovered assets. This allows for automated pushing of assets without
invoking the resource getters, for example pre discovered files.
2017-11-28 08:12:31 +00:00
Marc Bonnici
30da77a1cf Framework: Moved resource deployment to base workload 2017-11-28 08:12:31 +00:00
Marc Bonnici
bc5b43df30 Utils/Android: Fix missing space in check
Logcat entries are split on a ':' followed by a space so ensure this
is present in the line instead of just a ':'. Some devices have entires
without the trailing space causing an error.
2017-11-24 16:38:01 +00:00
Sergei Trofimov
d7da24eb52 framework/config: fix section-level workload args
create a copy of the args dict before popping args off of it to make
sure it is intact when the next job is processed.
2017-11-24 16:35:07 +00:00
Sergei Trofimov
4201193ffc processors/csv: fix artifact writing
Rename loop variable inside _write_outputs so that it doesn't clash with
the argument that gets passed (this resulted in writing to the wrong
location when writing a run artifact from a job).
2017-11-24 16:35:07 +00:00
Sergei Trofimov
76e220bb0b processors: add uxperf
Add a simplified version of the uxperf processor. This version only
extracts and calculates durations of UX_PERF sections from logcat.
Currently, this does not correlate them agains frames/fps data.
2017-11-24 14:30:09 +00:00
Sergei Trofimov
9a15b82997 framework/job: do not extract workload results on failure
Now that job output processing happens even on failure, this will result
in workload result processing also being triggered. We should not try to
extract failed workload results, so check the job status before
attempting to do so.
2017-11-24 14:30:09 +00:00
Sergei Trofimov
45d8be5228 framework/execution: ensure output is always processed
Ensure that job output is processed even if a workload fails. This is
because output processing includes things like extracting logs, which
we still want to happen on failure.

Job status is now also set correctly when an error occurs during output
processing rather than actual running of the workload. Previously, the
status would be correctly set to PARTIAL in the inner except clause,
but the exception is then re-raised, and the status was "upgraded" to
FAILED in the outer except clause.
2017-11-24 14:30:09 +00:00
Sergei Trofimov
39e63f1358 utils/android: add a parser for Logcat
Add a simple streaming parser for Logcat logs. At the moment, only the
recent logcat format is supported.
2017-11-24 14:30:09 +00:00
Sergei Trofimov
7cd2982b31 workloads/uxperf: change message format
Do not concatenate start/stop markers to the action string with a '_',
delimit them with a space instead. This will make easier to parse the
message afterwards.
2017-11-24 14:30:09 +00:00
Marc Bonnici
2611579d29 Framework/Workload: Fix typo 2017-11-23 17:49:30 +00:00
Marc Bonnici
e9ae08e00b Framework/Workload: Utilize package_names during package resolution
Iterate through available package names when resolving an apk file from
the host.
2017-11-23 17:49:30 +00:00
Marc Bonnici
ff529462e0 Framework/Workload: Require package name for package resolution
Mandate that either a package name is specified or the owner defines
supported package names. This prevents any apk file in the correct
location incorrectly being resolved.
2017-11-23 17:49:30 +00:00
Sergei Trofimov
49eb40fec7 framework/workload: add markers_enabled param for uiauto workloads
Some workloads can insert timestamped markers into the logs if this
parameter is enabled in their automation. These markers can then be
used to look at measurements for specific parts of the execution.
2017-11-22 09:22:21 +00:00
Sergei Trofimov
73a530917a framework/workload: fix asset_files and deployed_assets
These two lists are updated by workloads as assets are discovered and
deployed. As these are defined as class attributes in the base Workload
class, the same two list instances are shared between all classes. This
results in subsequent workloads re-deploying assets from the previous
workloads, and may lead to mismatches with deployable_assets, which is
overwritten on per-workload basis.

Make these into instance attriutes to prevent these issues.
2017-11-22 09:22:21 +00:00
Sergei Trofimov
652f107d10 framework/workload: fix class attribute docs
Change from free-floating strings into comments and move above the
corresponding attribute.
2017-11-22 09:22:21 +00:00
Quentin Perret
be18157223 framework/target: wait 20 sec for network to show up
Some targets need more than 5 seconds to re-connect to a wifi network
after disabling airplane mode. To fix that, poll for network up to 20
seconds and show a warning if unreachable.
2017-11-17 07:53:16 +00:00
Marc Bonnici
8a913639bd Framework/Workload: Fix call to deploy assets 2017-11-15 15:59:27 +00:00
Marc Bonnici
612646606d GoogleSlides: Ported workload from WA2 2017-11-15 14:47:36 +00:00
Marc Bonnici
1f5a34b9a8 Framework/Uiautomator: Adds Ui Swipe functions 2017-11-15 14:47:36 +00:00
Marc Bonnici
7aa50779e6 GooglePlayPhotos: Ported workload from WA 2017-11-15 14:47:36 +00:00
Marc Bonnici
23bcadd750 Uiauto/BaseUiAutomation: Add helper function to select gallery folder 2017-11-15 14:47:36 +00:00
Marc Bonnici
57677e7e6c GooglePlayBooks: Ported workload from WA2 2017-11-15 14:47:36 +00:00
Marc Bonnici
d3a2242dd3 Framework/Workload: Fix incorrect error message being reported 2017-11-15 14:47:36 +00:00
Marc Bonnici
a289a21cbc Framework/RuntimeConfig: Fix crash if no idle states available. 2017-11-15 14:47:36 +00:00
Marc Bonnici
af3dda1b28 AdobeReader: Ported workload from WA2 2017-11-15 14:47:36 +00:00
Marc Bonnici
4e3a30b515 AndroidTarget: Ensure permissions are granted for installed application
Upon clearing data of a previously installed application the runtime
permissions can also be cleared, to avoid having to reinstall the
application all available permissions are explicitly granted to the
required application.
2017-11-15 14:47:36 +00:00
Marc Bonnici
c332715e4a Workload: Adds support for deploying/cleanup of additional assets
Allows for automatically pushing a set of arbitrary assets to the device
during initialization and adds a parameter to specify whether the assets should
be removed again at the end of the run.
2017-11-15 14:47:36 +00:00
Marc Bonnici
496c3ef021 Framework/Uiauto: Adds UxPerfUiAutomation related functionality
Adds various methods that are used in UxPerf workloads and additional
helper class for UxPerf specific functions.

Adds a class to contain UxPerf specific functions.
2017-11-15 14:47:36 +00:00
Sergei Trofimov
bd23202dca framework/entrypoint: fix joined options parsing.
In order to properly enable verbose logging for plugin enumeration,
verbosity option must be extracted before commands are processed, and
therefore before all valid arguments are known.

ArgumentParser.parse_known_args() is used for this, which will collect
all unexpected arguments into an "extras" list, rather than raising an
error. This, however, has an outstanding bug, where if say option '-v'
is known and '-f is unknown, args '-v -f' will be parsed correctly (with
'-f' being collected into extras), but '-vf' will not, resulting in an
error.

To get around this, pre-process sys.argv to detect joined options and
manually split them into separate args.
2017-11-07 17:23:26 +00:00
marcbonnici
ea47748c89
Merge pull request #537 from bjackman/csvproc-fix
Csvproc fix
2017-11-07 09:04:14 +00:00
Brendan Jackman
61f4656bf9 csvproc: Fix process_run_output
We currently populate results_so_far with a JobOutput for each Job and then a
Result for the RunOutput. This results in a bug when trying to access the
id/label/iteration.

This is fixed by always ensuring the we store Output objects and not
Results (results_so_far is renamed to outputs_so_far to reflect this), and
treating the RunOutput specially in _write_outputs.
2017-11-06 18:21:26 +00:00
Brendan Jackman
068ab9559d framework/command: Fix help string for --config cmdline argument 2017-11-06 16:41:01 +00:00
Brendan Jackman
c8fb995eca framework/command: Whitespace 2017-11-06 16:41:01 +00:00
Brendan Jackman
2cd0c1a3f1 framework/config: Fix JobSpec.from_pod 2017-11-06 16:11:54 +00:00