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

718 Commits

Author SHA1 Message Date
Sergei Trofimov
58c4ae609c framework/output_processor: fix get_output_processor()
Output processor names are converted to identifiers when they are
loaded. Ensure the same thing happens when looking up installed output
processors with get_output_processor().
2018-02-06 09:49:58 +00:00
Marc Bonnici
019e5da79e workloads/thechase: Port workload to WA3
Updated default view to run on Android N
2018-02-01 14:27:45 +00:00
Marc Bonnici
ed77855949 instruments/trace-cmd: Only insert trace markers if enabled
Check to see if the instrument is enabled before adding start and stop
trace markers.
2018-02-01 14:26:08 +00:00
Marc Bonnici
9a556721b6 Augmentations: Allow configuring of augmentations per workload
Add support for enabling and disabling of augmentations (instruments and
output processors) on a per workload basis.
2018-02-01 14:26:08 +00:00
Marc Bonnici
557d62ce86 framework/configuration: Fix disabling of augmentations
Previously disabling of augmentaions via using the `--disable`
flag or by using the "~" notation in agendas was ignored.
2018-02-01 14:26:08 +00:00
Marc Bonnici
d9a7e1c475 utils/types: Add add method to toggle_set
Allows adding of elements that will respect the state of an existing
element in the toggle set.
2018-02-01 14:26:08 +00:00
Marc Bonnici
2699bceba3 workloads/googleslides: Fix unable to locate image on chromebook 2018-01-31 19:16:51 +00:00
Marc Bonnici
cba773b5e6 workloads/gmail: Fix to use passed working directory parameter
In devlib the default working directory has changed causing the workload
to look in the wrong directory, now the workload should use the passed
working directory and extract the relevant name from there.
2018-01-31 19:16:51 +00:00
Marc Bonnici
e5ed64d8d5 trace_cmd: Rename trace-cmd to trace_cmd
Both the instrument and utility functions were called `trace-cmd.py`.
`"-"`'s are not valid python identifiers therefore when trying to import
the `trace-cmd` module this causes an error.
2018-01-25 16:28:51 +00:00
Sergei Trofimov
902c3c6ace instruments/poller: add ftrace marker support
- Add an option to the poller binary insert a marker into ftrace that
  aligns with the first output entry. The option is exposed as an
  instrument parameter.
- If this parameter is set, the resulting .csv will be post-processed to
  update the timestamps to align with trace-cmd output.
- Change poller artifact names to use - instead of _ to be consistent
  with trace-cmd artifact naming.
2018-01-25 10:50:02 +00:00
Sergei Trofimov
dae4d9a934 framework/execution: add context to job signals
Pass the execution context to job execution signal callbacks.
2018-01-25 10:50:02 +00:00
Sergei Trofimov
a2c113e0f9 framework/signal: log on connect/disconnect
Add debug level logging for connect() and disconnect() functions.
2018-01-25 10:50:02 +00:00
Sergei Trofimov
fc56de8842 framework/instruments: add ManagedCallback __repr__
Add a __repr__ for ManagedCallback callback to prove a useful
representation in logging.
2018-01-25 10:50:02 +00:00
Marc Bonnici
1101c358d0 framework/rt_config: Add support for chromeos for some AndroidRTConfig
Allows setting of select android runtime configuration for devices running
chromeos and which support android. Currently only 'brightness' is functioning
correctly therefore the other parameters are only enable for standard android devices.
2018-01-25 06:32:37 +00:00
Marc Bonnici
320da77ac0 framework/workload: Adds support for ChromeOs Targets
Adds a check if the target is running ChromeOs and if so only use the
Android Container portion for running thr workload.
2018-01-25 06:32:37 +00:00
Marc Bonnici
b4d6017dd4 framework/descriptor: Add ChromeOsTarget 2018-01-25 06:32:37 +00:00
Marc Bonnici
a7bf5c2df9 ChromeOsAssistant: Add assistant for ChromeOS 2018-01-25 06:32:37 +00:00
Marc Bonnici
776a4d850b framework/rt_config: Remove over cautious error checking.
Previously when validating cpufreq runtime parameters it would check too
early whether the cpu was online, not allowing for the fact that the cpu
might be being onlined before the parameter was committed to the device.
2018-01-18 16:16:45 +00:00
Marc Bonnici
3cf789e352 framework/rt_config: Fix not being able to turn off all cpus in cluster
Add missing equality sign in constraint for runtime parameters.
2018-01-18 16:16:45 +00:00
Marc Bonnici
60c16c802f framework/rt_config: Fix typo in hotplug big.LITTLE RT Params 2018-01-18 16:16:45 +00:00
Marc Bonnici
7100165376 configuration/core: Fix alias for 'results_processors'
Adds missing 's' for alias name.
2018-01-17 16:41:49 +00:00
Marc Bonnici
cf39d6c8d3 workloads/memcpy: Fix typos 2018-01-15 15:42:26 +00:00
Marc Bonnici
4b8d8d62c5 workloads/memcpy: Adds once decorators to workload
Ensure that the binary is only installed and uninstalled only once for
this workload.
2018-01-15 15:42:26 +00:00
Marc Bonnici
f26d819aad utils/exec_control: Fix once decorator implementation
Ensures that the once decorator does not affect classes in a parallel
inheritance hierarchy.
2018-01-15 15:42:26 +00:00
Patrick Bellasi
b0262e5103 Exoplayer: Add support for Landscape mode
To improve reproducibility of tests, it could help to ensure that the
same screen orientation is used on media playback.
This adds a new workload parameter which allows to ensure a LANDSCAPE
mode, which can be useful to better represent video playback scenarios.
When not enforced by the agenda, we enforce a PORTRAIT orientation.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2018-01-15 13:52:11 +00:00
Marc Bonnici
446a1cfbb0 wa: Rename Instrumentation to Instruments
To be maintain a consistent naming scheme, rename all instances of
`Instrumentation` to `Instruments`
2018-01-15 10:24:03 +00:00
Marc Bonnici
987f4ec4f1 wa: Rename update_results reference to update_output
To be consistant with the rename of output_processors, old references
to `update_results` have now been changed to `update_output`.
2018-01-15 10:24:03 +00:00
Marc Bonnici
538cd8d332 wa: Rename results_processors to output_processors
For clarity and to better reflect their purpose, rename
`results_processors` to `output_processors`.
2018-01-15 10:24:03 +00:00
Marc Bonnici
a688c9120e framework/configuration: Fix missing return statements for Jobspec properties 2018-01-12 17:28:56 +00:00
Marc Bonnici
bd9189f26a framework/getters: Fix missing return in Filer Getter 2018-01-12 17:28:56 +00:00
Marc Bonnici
58131c1a6d framework/plugin: Fix clearing of loaded plugin
`self.plugins` should be a dictionary and when being cleared was being
reinitialized as a list.
2018-01-12 17:28:56 +00:00
Marc Bonnici
4fc39dedbc framework/execution: Fix message parameter order 2018-01-12 17:28:56 +00:00
Marc Bonnici
0047ce31d7 commands/run: Fix formatting 2018-01-12 17:28:56 +00:00
Marc Bonnici
937d417a42 framework/parsers: Fix whitespace 2018-01-12 17:28:56 +00:00
Marc Bonnici
ad530a8925 framework/parsers: Fix incorrect method name 2018-01-12 17:28:56 +00:00
Sergei Trofimov
fbb1a125fd framework/target: fix caseless runtime params
Fix the setting of runtime parameters when the casing of the parameter in
the agenda does not match the "canonical" casing.

To make the writing of agendas easier, the casing of the parameters is
supposed to be ignored. To achieve this, parameter names are converted to
caseless_string type before they are looked up.

caseless_string's do not work with dicts. Both __contains__ (used for
the "in" operator) and __getitem__ (used for the [] operator) implement
hash-based look up, and it is not possible to have a caseless_string
match against multiple hashes to cover the different casing
possibilities.

So instead, iterate over the items in parameters dict, comparing the
caseless_string name to the key, and returning the value if it matches.
2018-01-11 11:04:25 +00:00
Sergei Trofimov
fabdcc5e30 workloads: port shellscript workload from WA2
Port shellscript workload that allows running an arbitrary shellscript
as a WA workload from WA2.
2018-01-10 09:16:44 +00:00
Marc Bonnici
51794c99e9 framework/workload: Fix incorrect regex matching apk filepath
On some devices an installed apk filepath can contain an '=' character
which was previously used to end the regex match. Now match with the
package name as well to ensure the file path is extracted correctly.
2018-01-09 10:45:58 +00:00
Marc Bonnici
d4f78afc30 workloads/rt-app: Port workload from WA2 2018-01-08 10:40:36 +00:00
Marc Bonnici
2dc1d2e54e confirguration/core: Add parameter default to MetaConfig
Uses os.eviron as the default environment for creation of a
MetaConfiguration object, this allows an instance to be created without
providing any parameters and fixes re-creating an instance from pod.
2018-01-08 10:36:57 +00:00
Marc Bonnici
6511db1559 framework/output: Fix RunOutput read_config
Fixes trying to deserialize wrong class type.
2018-01-08 10:36:57 +00:00
Marc Bonnici
950427f478 utils/revent: Refactor ReventRecording to avoid duplicate target calls
Changed location of revent binary on target to be a class attribute so that
it is shared across all instances. Also changed discovery method to a
static method which can be memoized to prevent the target being queried
unnecessarily.
2018-01-08 10:36:02 +00:00
Marc Bonnici
b1a15b3458 workloads/angrybirds_rio: Add missing package name 2018-01-08 10:34:51 +00:00
Marc Bonnici
635ebc1f4d commands/show: Improved formatting of show command 2018-01-08 10:34:32 +00:00
Sergei Trofimov
833c3dd0a0 framework/target: manager: use get_target_description
use the new get_target_description() when initializing the target inside
TargetManager, instead of manually searching through results of
list_target_descriptions().
2017-12-15 17:07:34 +00:00
Sergei Trofimov
d11165b703 framework/target: add get_target_descriptor()
Add a function to get a TargetDescriptor by its name.
2017-12-15 17:07:34 +00:00
Sergei Trofimov
0a67e94709 framework/target: rename get_target_descriptions
Rename get_target_descriptions to list_target_descriptions.
2017-12-15 17:07:34 +00:00
Marc Bonnici
7bd99637c1 Target/AndroidAssistant: Try to disable selinux
If the target is rooted, attempt to disable selinux as this can cause
issues during runtime.
2017-12-14 17:56:29 +00:00
Marc Bonnici
38e11f6777 commands/show: Adds show command
The show command will try to use pandoc and man to display the relevant
information and will fall back to printing the markdown if pandoc is not
available.
2017-12-14 09:50:26 +00:00
Marc Bonnici
103368415b target/descriptor: Fix sudo_cmd parameter description 2017-12-14 09:50:26 +00:00
Marc Bonnici
9832db9fa5 utils/doc: Rename get_rst_from_extension for consistency 2017-12-14 09:50:26 +00:00
Marc Bonnici
346ce2fb15 framework/workload: Fix typo and formatting 2017-12-14 09:50:26 +00:00
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
Sergei Trofimov
95e9d14f9d framework/resource: clearer file and exe strings
Update the File and Executable resource string representations to
actually include the words "file" and "executable" respectively to make
messages containing these representations (e.g. when a resource is not
found) clearer.
2017-11-03 17:33:54 +00:00
Sergei Trofimov
00d1d3d318 commands/run: update "--disable" option
--diable can now be used to disable both intruments and
result_processors from the command line (overriding configuration
files). Rename variable names to reflect this.
2017-11-03 17:33:32 +00:00
Sergei Trofimov
836ba1505f framework/config: properly update augmentations inside JobGenerator
Replace update_enabled_instruments with update_augmentations, which
correctly splits instruments and results processors from augmentations
configuration values.

While instruments and processors are now handled uniformly in
configuration, they still need to be handled differently during actual
execution. This is the point where they get split again.
2017-11-03 17:33:32 +00:00
Sergei Trofimov
e3d74fcd21 framework/config: fix augmentations merging
Remllace merge_instruments_result_processors with merge_agumentations
which is updated to properly merge the new unified "augmentations"
configurations.
2017-11-03 17:33:32 +00:00
Sergei Trofimov
4f8bd00fe2 framework/config: add eanbled processor tracking to JobGenerator
Add attributes for tracking enabled processors to JobGenerator (similiar
to what already exists for instruments).
2017-11-03 17:33:32 +00:00
Sergei Trofimov
337c5e5e1d framework/config: rename instrumenation --> augmentations
Rename ConfigurationPoint "instrumenation" to "augmentations". Unlike
WA2, in W3, instruments and result_porcessors are handled identically in
configuration (though there're still distinct pulgin types).
"instrumentation" and "result_porcessors" entries in configuration are
now aliases for the same configuration point, which is renamed to
"augmentations" to reflect the fact that it contains both types of
plugins.
2017-11-03 17:33:32 +00:00
Sergei Trofimov
2ff1a87e53 utils/types: fix toggle_set docstring
The docstring claimed that the toggle_set was "A list that...".
2017-11-03 17:33:32 +00:00
Sergei Trofimov
f5cc58d847 framework/config: add get_plugin_class to PluginCache
Expose PluginLoader's get_plugin_class via PluginCache. PluginCache is
basically intented to act like a PluginLoader, except when instantiating
plugins, the "default" parameter values are taken form the cached
configruation, rather than the actual defaults defined in the Plugin's
parmaters.
2017-11-03 17:33:32 +00:00
Brendan Jackman
2c1d37fb6b csvproc: Fix process_run_output method name 2017-11-03 14:07:44 +00:00
Brendan Jackman
a9740f37a2 csvproc: Typo 2017-11-03 14:07:44 +00:00
Brendan Jackman
b88004be94 csvproc: Whitespace 2017-11-03 14:07:44 +00:00
Brendan Jackman
bf14242c74 framework/signal: Fix typos 2017-11-03 14:07:44 +00:00
Brendan Jackman
47e9b95d4d framework/signal: Whitespace 2017-11-03 14:07:44 +00:00
Brendan Jackman
200aa84d0b exoplayer: Add an ogg format option 2017-10-31 09:11:04 +00:00
Brendan Jackman
d749fe0f8e exoplayer: call validate from init_resources 2017-10-31 09:11:04 +00:00
Brendan Jackman
df2ae3c451 exoplayer: Add metric for dropped frames 2017-10-31 09:11:04 +00:00
Brendan Jackman
b17a0d30c0 exoplayer: Add exoplayer workload
This is based heavily on a combination of WA2's video workload and LISA's
exoplayer workload.
2017-10-31 09:11:04 +00:00
Sascha Bischoff
9b58662ae7 workloads/dhrystone: Fix taskset
Was invoking busybox in a hardcoded way, and was not using
self.target.busybox. Updated to use the correct version.
2017-10-26 12:34:35 +01:00
Brendan Jackman
74bf1a82e0 geekbench: Allow on unrooted when disable_update_result 2017-10-25 19:38:40 +01:00
Brendan Jackman
a08d6262ba geekbench: Use root to pull results XML file
This is required, I don't know why this was working before. Maybe only tested
after people had run 'adb root'?
2017-10-25 19:15:46 +01:00
setrofim
eb0f53c8f6 Merge pull request #519 from bjackman/requires-network
Add Workload.requires_network
2017-10-24 14:36:42 +01:00
setrofim
829ac73f06 Merge pull request #525 from setrofim/next
Fixes.
2017-10-23 18:04:25 +01:00
setrofim
807a2e13dd Merge pull request #527 from bjackman/dmesg-fix
Dmesg instrument fixes
2017-10-23 17:52:00 +01:00
setrofim
dc4b517231 Merge pull request #521 from bjackman/failed-init-no-kill
framework: Add bail_on_init_failure run configuration
2017-10-23 17:50:41 +01:00
Brendan Jackman
4b7d43de9e utils/log: Convert exception to string before passing to Logger
Now that we add an event when logging errors, we need to avoid passing an
exception object directly to the logger. Otherwise we end up adding the
unserializable Exception object to the events list, which causes an error when
trying to write the output.
2017-10-23 17:25:15 +01:00
Brendan Jackman
b11bd6cf12 utils/log: Whitespace 2017-10-23 17:25:02 +01:00
Brendan Jackman
462c3eaa78 instrumentation/dmesg: Fix missing @slow decorator 2017-10-23 17:10:39 +01:00
Brendan Jackman
c7af676d00 instrumentation/dmesg: Fix use of devlib APIs
I missed these call sites when porting this from WA2.
2017-10-23 16:49:27 +01:00
Brendan Jackman
9fa1b133dc framework: Add bail_on_init_failure run configuration
This maintains the default behaviour of bailing out immediately if any workload
fails in initialize(), but adds a setting, bail_on_init_failure, to change this
behaviour optionally. This can be useful where WA is being used more as a batch
processor.
2017-10-23 16:44:49 +01:00
Brendan Jackman
4a001713bb framework/execution: Factor out skip_job method
This also fixes the missing housekeeping when skipping a job due to phones_home
2017-10-23 16:44:49 +01:00
Sergei Trofimov
890428dbf6 framework/execution: fix end of run status reporting
Changes to the Status enum introduced by 31a535b5 and a9959550 broke
ran Jobs summary status at the end of the run. This fixes it so that the
total number of jobs and individual status counts are reported
correctly.
2017-10-23 14:31:24 +01:00
Sergei Trofimov
4826f8f2f2 framework/target: fix generic "frequency" runtime param
The generic "frequency" runtime parameter was only being set when there
are common frequences between avialable cores. It should always be set,
even if there are no frequencies in common, as it still valid to use it
with special values "min" and "max", in which case it should resolve
correctly to the appropriate frequencies.
2017-10-23 14:31:24 +01:00
Sergei Trofimov
8dd1e6636c framework: set context for loggers
Set context for the loggers of the Runner, the workloads and the
installed instruments and processors. Errors/warnings logged by these
entities will be automatically added as events.
2017-10-23 12:28:49 +01:00
Sergei Trofimov
47d883de09 utils/log: add ContextLogger
Add ContextLogger wich extends logging.Logger's  warning and error
methods to automatically add the message to the context's events (if a
context has been provided).
2017-10-23 12:28:29 +01:00
setrofim
551b47a958 Merge pull request #522 from bjackman/job-log-iteration
framework/job: Include job iteration in log messages
2017-10-19 16:32:18 +01:00
Brendan Jackman
138ed1495e framework/job: Include job iteration in log messages 2017-10-19 16:28:43 +01:00
Brendan Jackman
fbcee730b2 RTConfig: Allow network to stabilise after disabling airplane mode
This enables you to do things like:

global:
  runtime_parameters:
    airplane_mode: true # This improves repeatability of energy measurements

workloads:
  - name: foo

  - name: bar

  - name: geekbench
    runtime_parameters:
      airplane_mode: false # Geekbench requires network, and we don't care
                           # about energy for that workload anyway
2017-10-18 12:40:36 +01:00
Brendan Jackman
b36316c900 workloads/geekbench: Add requires_network attribute 2017-10-18 11:50:30 +01:00
Brendan Jackman
71815e4e1c framework/workload: Implement Workload.requires_network attribute 2017-10-18 11:50:29 +01:00
Chris Redpath
85c39cd48e instrumentation: Add support for Devlib's monsoon instrument
The parameter support is untested as the defaults match what my system
does.

Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2017-10-17 12:16:52 +01:00
setrofim
73f863f281 Merge pull request #515 from bjackman/hwmon
hwmon: Add hwmon instrument
2017-10-13 14:44:16 +01:00
Brendan Jackman
a719f3b156 hwmon: Add hwmon instrument
For some reason I didn't look at the WA2 instrument until afer I
wrote this, so it's different in how it handles 'before/after'
quantities (which I called 'momentary' in the code) - instead of
adding a 'mean' it just adds two separate metrics: one for before and
one for after. Personally I think this is more useful (esp. for
temperature) but if necessary I can revert to the old behaviour.

This also doesn't add the helpful classifier telling you the hwmon
device, because we don't have immediate access to that info from the
devlib Instrument. If necessary I'm sure it could be added later.

Furthermore it doesn't have a parameter to filter the sensors, just
collects from them all.
2017-10-12 18:16:23 +01:00
setrofim
9e8c0cfb32 Merge pull request #516 from bjackman/trace-cmd-very-slow
trace-cmd: Add missing very_slow decorator to stop method
2017-10-12 18:00:50 +01:00
Brendan Jackman
a5badad8e9 trace-cmd: Add missing very_slow decorator to stop method 2017-10-12 17:58:45 +01:00
Brendan Jackman
f6fa6ba793 instrumentation: Port dmesg instrument from WA2 2017-10-11 15:43:40 +01:00
setrofim
d7a6a3c82a Merge pull request #509 from setrofim/next
Fixes
2017-10-11 15:31:34 +01:00
Brendan Jackman
04181e5859 energy_measurement: Fixup standard metrics fix
Typo'd this and seems I failed to test it
2017-10-11 15:26:04 +01:00
setrofim
4eda719130 Merge pull request #511 from bjackman/energy-measurement-standard-metrics
energy_measurement: Ensure 'standard' energy metrics are produced
2017-10-10 15:40:00 +01:00
Brendan Jackman
cd54cb7baf energy_measurement: Ensure 'standard' energy metrics are produced
Where backends have the capability to collect from multiple devlib
Instruments, EnergyMeasurement currently appends 'device' keys to the
names of metrics reported by those Instruments. Where multiple
Instruments are indeed used, it then sums up equivalent metrics to
produce the 'normal' metric without the 'device' keys
appended.

E.g. If you have two ACME 'devices' enabled you will get something
like
'device_total_energy_iio:device0' and
'device_total_energy_iio:device1', which will be summed to produce
'device_total_energy'.

However when only one Instrument is actually instantiated, this is
not needed and not done. Therefore just directly produce the metric
with the name originally given by devlib (i.e. in the example,
'device_total_energy').
2017-10-10 15:25:38 +01:00
Sergei Trofimov
1daec4f2c5 framework/getters: fix http getter APK resolution
Fully matching an APK resource requires the file to be present locally,
so that its metadata can be queries. HTTP getter was matching against a
remote path so the match was failing.

The matching now happens in two stages == first partial path-only
matches are established. Secondly, all partial matches are downloaded
and final match occurs against downloaded files.
2017-10-10 13:14:07 +01:00
Sergei Trofimov
5f7c64b089 framework/resource: add match_path method
This method is used to partially match a resource; its implementation
cannot rely on the resource file actually being present and must match
against the specified path alone.

match() implementation now defaults to match_path(), as for most
resource types, the path is sufficient to uniquely match a resource.
2017-10-10 11:39:53 +01:00
Sergei Trofimov
a6cb9eb6a4 instrument/energy: Fix backend parameter passing
- Convert parameter keys to identifiers before applying
- Raise an error if passed a param invalid for a backend.
2017-10-10 09:51:13 +01:00
setrofim
c3438b6814 Merge pull request #500 from setrofim/next
memcopy workload + fix gem5 support.
2017-10-10 08:58:24 +01:00
setrofim
590309b6be Merge pull request #508 from bjackman/instrumentation-typo
instrumentation: Fix typo
2017-10-10 08:40:25 +01:00
setrofim
bfa7e81996 Merge pull request #507 from bjackman/energy-measurement-check
energy_measurement: Check for failure of Instrument::get_data
2017-10-10 08:40:10 +01:00
Brendan Jackman
049e2df0dc instrumentation: Fix typo 2017-10-09 18:26:41 +01:00
Brendan Jackman
b4a608da95 energy_measurement: Check for failure of Instrument::get_data
Devlib's get_data API can return None when something goes wrong -
this currently results in us attempting to add a non-existent
artifact.

To avoid this confusion, check and use the return value from
get_data, instead of assuming that it will write data to its
'outfile' parameter.
2017-10-09 16:17:02 +01:00
Brendan Jackman
016d68bfa0 PluginCache: Improve error message for ill-formed plugin config
Currently if you get confused and write a config with something like:

energy_measurement:
  acme_cape

Then you get an error when we try to 'iteritems' on the value
'acme_cape'. Instead, explicitly check for this case.
2017-10-06 18:00:38 +01:00
Sergei Trofimov
287ab8d565 instrumentation/misc: fix sysfile_getter/cpufreq
- Fix start/stop methods of sysfile_getter, which where still using the
  WA2 mechanic of prefixing "slow_" to the name to indicate priority,
  and consequently weren't being invoked.
- Call super inside cpufreq's valide(() to make sure tempfs path is set.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
5ecc4703e4 framework/execution: fix TargetManager termination
- Make sure TargetManager.finalize() actually gets called at the end
  of the run.
- Overrule the "diconnect" parameter behavior for gem5 and make sure it
  always disconnects. This necessary for stats to be generated properly.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
05e90bd623 instrumentation/misc: fix interrupts instrument
When porting from WA2 interrupt instrument retained references to
"device" instead of "target".
2017-10-06 15:04:02 +01:00
Sergei Trofimov
0d54c5f070 workloads: add memcpy workload
Ported memcpy workload from WA2.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
c93b1a0939 utils/log: adjust level for CGgroups logger
devlib's CGgroups module logs things at INFO level. The information it
logs is too detailed for what WA considers "INFO", and should be logged
at DEBUG level instead.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
c89e249732 framework/target: add ability to pass additional platform params.
Gem5Platform requires a host output directory as one if it's
instantiation parameters. This is not something we want to expose a
configuration parameter to the user, as for WA, the standard output
directory ought to be used.

Up to this point, WA's target instatiation process assumed that all
parameters came from the user, and there was no way for WA itself to set
them. This commit adds extra_platform_parms argument to
instantiate_target, to remedi this.

extra_platform_parms is then used to set the host output directory for
gem5 appropriately.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
55a72002ca framework/target: fix gem5 target descriptor
(linux|android)_gem5 devices were being described as having gem5
platforms but standard linux/android connections. This commit fixes this
by making sure that the gem5 connection is used.
2017-10-06 15:04:02 +01:00
setrofim
12edabf753 Merge pull request #501 from bjackman/acme-multiple-instruments2
energy_measurement: Allow multiple IIO devices for ACME
2017-10-06 15:01:31 +01:00
setrofim
ae1363d573 Merge pull request #505 from bjackman/geekbench-fixes
geekbench: Fix use of WA3 APIs
2017-10-06 14:55:37 +01:00
Brendan Jackman
6d6fc25e40 geekbench: Fix use of WA3 APIs
Seem I cherry-picked the geekbench workload from my WIP branch
without testing properly, and missed a fixup commit. Here's the
content of that commit, which fixes some missing updates from WA2 ->
WA3 APIs.
2017-10-06 14:51:50 +01:00
Brendan Jackman
e672ea3faf energy_measurement: Allow multiple IIO devices for ACME
Devlib's ACME instrument uses iio-capture under the hood, which can
only capture data from one IIO device at a time. Devlib's instrument
API expects to produce a single CSV file for the Instrument, with a
single axis of sample timestamps. These two things cannot be
correctly reconciled without changing the devlib Instrument API -
get_data would need to be able to return two distinct sets of data.

Instead, where required WA will instantiate the ACME instrument
multiple times (once for each IIO device), producing two separate CSV
files. Aggregated energy info (as opposed to timestamped samples of
energy data) _can_ be meaningfully combined from multiple IIO
devices, so the derived stats are summed.

This requires altering the internal API of the energy_measurement
module - rather than a single instrument the super-instrument now has
a dictionary mapping 'device' keys (this is really an arbitrary key,
but I think that 'device' is a justifiable metaphor for whatever
might separate multiple instruments, plus it is the terminology used
by IIO/ACME) to Instrument objects.  Existing instruments simply
return a dict with a single entry, with None as the key.

It may in future be possible to solve this problem in devlib's ACME
instrument by avoiding the use of the iio-capture tool. In that case,
it should be possible to basically revert this patch and get the
required funcitonality from devlib.
2017-10-06 14:43:54 +01:00
Sergei Trofimov
bce66f4388 framework/target: fix runtime param name resolution
Runtime param names from config were matched against names available on
for the target using an overly-loose regex that resulted in the wrong
config point being returned.

Use caseless_string matching instead.
2017-10-06 14:21:23 +01:00
Sergei Trofimov
ce3064dd6f instrument/energy: correct backend param init
As paramters defined by energy_measurement instrument backends were not
used in instantiating the backends, but the underlying devlib
instrument, the values did not undergo the usual Plugin parameter
setting perocedure. In particuar, type conversion would not take place.

Make sure backend parameters are validated properly by setting them on
an obj_dict before passing them  to the devlib instrument.
2017-10-06 13:55:16 +01:00
Sergei Trofimov
109490ec3e utils/types: make list_of classes serializable 2017-10-06 12:55:25 +01:00
Sergei Trofimov
7d9b6d6dd7 framework/config: ensure correct type for param defaults
Call self.kind() on the default value of a parameter before assigning it
to make sure that the assigned value is of correct type.
2017-10-06 12:52:57 +01:00
Sergei Trofimov
6e0cb73a4e framework/config: make LoggingConfig serializable 2017-10-06 12:52:12 +01:00
Brendan Jackman
b18db64be1 youtube_playback: Add youtube_playback workload
This is a very simple workload that just aims to allow collecting
instrumentation data on purely the video decoding aspect of Youtube.
2017-10-06 10:31:41 +01:00
Brendan Jackman
f767714cd4 target/descriptor: Fix typo for 'telnet' param 2017-10-05 13:27:08 +01:00
setrofim
85d23421b9 Merge pull request #497 from bjackman/phone-home
Add feature to mark workloads unsafe for confidential devices
2017-10-04 15:57:41 +01:00
setrofim
24d96c2397 Merge pull request #496 from bjackman/docstring-tweaks
Misc clarifications/cleanups
2017-10-04 15:56:58 +01:00
Brendan Jackman
73d45b69a5 geekbench: Mark as a workload that may phone home 2017-10-04 15:43:03 +01:00
Brendan Jackman
06b451d31b framework: Add feature to mark workloads unsafe for confidential devices
Some workloads, such as Geekbench, may phone home and report data about the
device they are running on. This poses a risk for users that are testing on
unreleased or otherwise confidential devices - perhaps they use a standard
agenda to run a large battery of tests, in which case they may forget to disable
these dangerous workloads.

This provides a mechanism to prevent running those workloads from running by
setting allow_phone_home=False in the user configuration.
2017-10-04 15:43:03 +01:00
Brendan Jackman
90e4cace06 target/descriptor: Add 'to false' to load_default_modules description 2017-10-04 15:42:18 +01:00
Brendan Jackman
188e5d752f framework/execution: Whitespace 2017-10-04 13:35:20 +01:00
Brendan Jackman
c4fe5b66e5 target/descriptor: Fix 'devlib' typo 2017-10-04 13:30:12 +01:00
Brendan Jackman
24dc8b2a65 target/descriptor: whitespace 2017-10-04 13:30:10 +01:00
Brendan Jackman
43f5cd793a PluginCache: Check plugin name before trying to iteritems
Currently if your config contains

typo_for_a_global_alias: 1

You will get an error where we try to call 'iteritems' on the value 1. This
commit re-orders the checks so that you instead get an error for the
unrecognised 'typo_for_a_global_alias'.
2017-10-04 13:28:53 +01:00
Brendan Jackman
8daae0752e PluginCache: whitespace 2017-10-04 13:28:52 +01:00
Brendan Jackman
ba01d011c5 geekbench: Add missing package_names attribute 2017-10-04 13:27:57 +01:00
Marc Bonnici
049530fe41 Youtube: Removes reference to UxPerf 2017-10-03 11:12:22 +01:00
Marc Bonnici
52b84b4030 Vellamo: Updated to automatically generate PackageID
Now generates packageID instead of using hardcoded values and removed
unused reference to UxPerf.
2017-10-03 11:12:22 +01:00
Marc Bonnici
3b7af8e52c Uiautomator: Adds missing support functionality
Adds initial implementation of ActionLogger class and adds method to
BaseUiAutomation to automatically generate packageID.
2017-10-03 11:12:22 +01:00
Brendan Jackman
e4965096e6 geekbench: Error early if target isn't rooted 2017-10-02 16:24:26 +01:00
Brendan Jackman
84404da471 geekbench: Port Geekbench workload from WA2
Differences from original:
- Standard renaming and rearrangement of imports
- UiAutomation.java now uses the setup() and runWorkload() phases which weren't
  present before.
2017-10-02 16:24:23 +01:00
Brendan Jackman
e5f13076ac BaseUiAutomation: Port uiDeviceSwipe methods from WA2 2017-10-02 16:17:36 +01:00
Sergei Trofimov
a65cffb705 trace-cmd: add trace files as artificats
The binary and text trace files were not being added as artifacts in WA
output.
2017-10-02 13:55:58 +01:00
Brendan Jackman
1eac74fa8f trace-cmd: Enable thermal trace events by default
Due to the nature of modern Android devices, in order to usefully
interpret the power* events, you more and more often need to know the
kernel's view of temperature too. Therefore I think enabling the
thermal event group by default makes sense.
2017-10-02 13:29:10 +01:00
Sergei Trofimov
9cb7ea862c framework/workload: default view for ApkWorkload
- Add "activity" property to PackageManager exposing the underlying
  apk_info attribute.
- Add "view" class attribute to ApkWorkload, initialized to None
- If "view" is not set for a particular workload, set a default based on
  the package and activity of the underlying workload.
2017-09-29 14:22:22 +01:00
Sergei Trofimov
4e6ba64737 instrumentation: add FPS instrument.
Add an instrument to collect FPS (frames per second) and associated
rendering statics using corresponding devlib functionality.
2017-09-29 13:50:23 +01:00
setrofim
241b4a5a3a Merge pull request #490 from bjackman/import-apkworkload
wa: Add ApkWorkload to default imports
2017-09-29 13:49:58 +01:00
Sergei Trofimov
19f9998c2e tools/revent: further fixes
- Ensure that CLOCK_MONOTONIC is used for all timestamps, so that the
  timestamps collected by revent and those reported in the struct
  input_event wouild match.

- Do not attempt to free events array inside fini_revent_recroding() if
  no events have been recorded.

- Add missing \n in some debug messages.

- Add end of recording debug message.
2017-09-29 09:48:25 +01:00
Sergei Trofimov
28e339d3b2 tools/revent: timestamp adjustment fixes
- Make sure start/end timestamps are properly adjusted when there are
  zero events.
- Rename adjust_event_times --> adjust_timestamps, as the latter better
  fits its current function.
- Add a couple of debug messages.
2017-09-28 15:11:28 +01:00
Brendan Jackman
14eba69229 wa: Add ApkWorkload to default imports 2017-09-28 13:09:28 +01:00
Sergei Trofimov
831515ae8d instrumentation/energy_measurement: update for DerivedMetrics
DerivedMeasurements in devlib was changed to return DerivedMetrics
instead of Measurements. The former do not have "channel" attribute, so
just pass its name to WA's metrics.
2017-09-28 13:06:33 +01:00
Sergei Trofimov
7b1cc6fa4e utils/serializer: add OrderedDict to POD_TYPES
Allow OrderedDict to be serialized in the same way as regular dicts by
defining it as a Plain Old Data type.
2017-09-28 10:46:03 +01:00
Sergei Trofimov
ecd0dbd55b Add templerun2 workload 2017-09-27 10:34:50 +01:00
Sergei Trofimov
9d7f998511 framework/instrumentation: handle non-job errors in ManagedCallback
If an error occurs in a ManagedCallback that is invoked outside of a
job, re-raise rather than attempting to update the status of the
non-existent job.
2017-09-27 10:34:50 +01:00
Sergei Trofimov
0c40cdae18 tools/revent: improve recording + add prebuilts
The begining and end of recording timestamps are now stored as part of
the recording. This allows to correctly replay recordings where the
first event occurs some time after the recording started, or the last
event some time before recording ended.

Add pre-built revent binaries for the armeabi and arm64 architectures.
2017-09-27 10:34:00 +01:00
Sergei Trofimov
0934037e1b revent fixes
- do not attempt to replay setup if a setup recording has not been
  provided (perviously, setup was mandatory).
- update the apk initialization to the correct method inside the record
  command.
2017-09-27 10:32:41 +01:00
Sergei Trofimov
335ed8198c instumentation/energy_management: update import to match devlib change 2017-09-27 10:32:41 +01:00
Sergei Trofimov
261417a9db framework/configuration: fix workload config with multiple sections
When an agenda contains multiple sections, the same workload entry might
be used in construction of multiple job specs. Job spec construction may
mangle the workload entry. To prevent this from impacting other
jobs, use a deep copy of the workload entry when constructing a job
spec.
2017-09-27 10:32:41 +01:00
Sergei Trofimov
c96181bed7 framework/configruation: fix mandatory workload parameters
PluginCache.get_plugin_config assumes that no more configuration is to
be processed, and therefore config is final. As such, it is validating
that mandatory parameters are set. This assumption is invalid for
workload_parameters, however, as those need to be resolved on per-spec
basis, and cannot be globally cached.

This commit adds a prameter for get_plugin_config that indicates whether
or not it should consider the config to be final.
2017-09-27 10:32:41 +01:00
Sergei Trofimov
aec89a077e framework/configuration: fix connection_settings configuration
Connection settings were not being properly extracted from device_config
and not used. Meaning it was impossible to e.g. specify the adb device
to use for a run.

This ensures that connection settings are extracted, validated, and used
properly.
2017-09-27 10:32:31 +01:00
Sergei Trofimov
04d5ec4277 framework/run: fix JobState deserialization
At some point, JobState __init__ was changed to take the iteration
number, but its from_pod was not updated accordingly.
2017-09-27 10:32:31 +01:00
Sergei Trofimov
7c7ffe3e77 framework/run: fix job status handling.
- Re-order Status entries so that higher severity entries have higher
  enum values.
- Add set_status() to Job that ensures that a status is only set if it
  is of higher severity (e.g. a Job that has been marked as PARTIAL by
  an instrument will not be overwritten as OK by the runner).
- Retry no generates a new job, rather than re-enqueuing the existing
  object; this ensures that the output status is tracked properly.
- Adjust ManagedCallback to set set job status to FAILED if it sees a
  WorkloadError, and to PARTIAL other wise. The idea being that
  instruments raise WorkloadError if they have a reason to believe
  workload did not execute properly and indicated failure even if the
  workload itself has failed to detect it (e.g. FPS instrument detecting
  crashed content, where the workload might lack any feedback regarding
  the crash). Other errors would indicate an issue with the instrument
  itself, and so the job is marked as PARTIAL, as there is no reason to
  suspect that the workload is at fault and the other results generated
  for this execution may be valid.
2017-09-27 10:32:20 +01:00
Sergei Trofimov
fe53efcd49 framework/workload: ApkWorkload consistent package handling
Rename "package" parameter to "package_name" (to be cosnsitent with
package_names class attribute). "package" is now a property containting
the name of the actual package used after the APK is resolved.
2017-09-27 10:32:20 +01:00
Sergei Trofimov
1e233d2104 framework/job: track run time.
Job now tracks how long it took to run the workload and save the
timedelta value in the run_time attribute.
2017-09-27 10:32:20 +01:00
Sergei Trofimov
2ef4074c8b framework/execution: ExecutionContext enhancements
- Add workload property as the shortcut for accessing the workoad for
  the current job.
- Add set_status method that setts the status of the current job.
- Add get_metric method that searches for a metric in the output for the
  current job, or failing that, in the run output.
2017-09-27 10:32:19 +01:00
Sergei Trofimov
82b0b238c2 framework/output: add accessors for metrics and artifacts
- Add get_metric methods to Result and Output
- Add metrics and artifacts properties to Output
2017-09-27 10:32:19 +01:00
Sergei Trofimov
9b6d4d9fa6 utils/revent: stop recording fix.
It seems that occasionally an inclomplete recording file is pulled. Add
a one-second (target time) delay to allow SIGINT to be properly handled
and recording to be updated, followed by a sync to ensure the file has
been written.
2017-09-27 10:32:19 +01:00
Sergei Trofimov
c29b1c8b23 utils/log: log_error marks Exception as logged.
Mark the Exception is logged inside log_error, to prevent it form being
logged repeatedly if re-raised.
2017-09-27 10:32:19 +01:00
setrofim
67eca23ef7 Merge pull request #479 from bjackman/homescreen
Homescreen: Port homescreen workload to WA3
2017-09-15 21:47:12 +01:00
setrofim
5063ed6907 Merge pull request #480 from bjackman/remove-cpufreq-interactive
trace-cmd: remove cpufreq_interactive from default events
2017-09-15 21:45:06 +01:00
Brendan Jackman
4063ea0ba8 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-09-15 18:05:17 +01:00
Brendan Jackman
a79fb83fd1 framework/workload: Fix resolve_packge_from_target
This currently raises an error undonditionally when self.package is set, fix the
indentation so it only does that if it isn't installed on the target.
2017-09-15 18:04:11 +01:00
Sergei Trofimov
df01d8aa22 Homescreen: Port homescreen workload to WA3
Just did:  wlauto      -> wa
           self.device -> self.target
2017-09-15 18:03:24 +01:00
setrofim
0cc8ebbf69 Merge pull request #469 from marcbonnici/energy_measurement
Energy measurement
2017-08-21 08:50:28 +01:00
Marc Bonnici
bd126a430d Instruments/EnergyMeas: Adds support for DerivedMeasurement from devlib
Delvib now is capable of performing postprocessing of MeasurementCSV
files, instead of calculating additional metrics in WA this will be
performed externally. Currently support has been added for calculating
average power and cumulative energy.
2017-08-18 09:53:27 +01:00
Marc Bonnici
0f506dde17 RTConfig: Added support for specifying device initial screen state. 2017-08-16 17:35:19 +01:00
Marc Bonnici
51464165c1 RTConfig: Added android runtime config
Added a runtime config for android specific settings, currently
supported are screen brightness, rotation and airplane mode.
2017-08-16 17:35:19 +01:00
Marc Bonnici
c5b1caa276 Utils/Enum: Adds a __str__ method to display enum levels 2017-08-16 17:35:19 +01:00
Marc Bonnici
2cc60b77cb Utils/Serializer: Adds serializer support for level type 2017-08-16 11:10:46 +01:00
Marc Bonnici
5f919445d9 EnergyMeaseurement: Adds support for acme_cape 2017-08-11 10:30:19 +01:00
Marc Bonnici
b98b74f0be EnergyMeasurement: Removes parameter defaults
The instrument baseclass expects None for not defined parameters
instead of empty containers.
2017-08-11 10:30:19 +01:00
Marc Bonnici
de3301312f RTParams: Adds support for using default values for RT parameters 2017-08-09 16:01:39 +01:00
Marc Bonnici
bbfb802c00 RuntimeConfig: Makes setter_params optional
Now setter_params are optional when creating a Runtime Parameter to
allow them to be used for more purposes which don't require additional
settings.
2017-08-09 16:01:39 +01:00
Marc Bonnici
06be73f8e1 RuntimeConfig: Fixed typo 2017-08-09 16:01:39 +01:00
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
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
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
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
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
Marc Bonnici
c0f5d36b9b PluginCache: Add name to duplicate source error 2017-06-12 14:57:55 +01:00
Marc Bonnici
ef3b80d296 Benchmarkpi: Updated to uiautomator2 2017-06-12 14:57:55 +01:00
Marc Bonnici
b84550d981 Uiautomator: Upgraded uiautomator base classes to Uiauto2
Uiautomator1 has been deprecated, therefore the uiautomation base classes have
been upgraded to use uiautomator2 and the new gradle build system.
2017-06-12 14:57:54 +01:00
Marc Bonnici
b9b237f288 Android Workload: Updated to install and use Uiautomator 2 tests.
The new method of using uiautomation 2 is by using instrumented apk files rather
than JAR files. This commit updates the base workload has been updated to
install/uninstall the new uiautomation APK files and to invoke the relevant
instrumentation.
2017-06-12 14:57:54 +01:00
Sergei Trofimov
f0d5ff2309 utils/trace_cmd: add parsers for more sched events
Added parsers for sched_wakeup(_new) and sched_stat_* events
that have non-standard text.
2017-05-31 10:47:50 +01:00
Sergei Trofimov
8e3ae321a2 trace-cmd: Add parser for text trace.
This re-adds the parser for the trace-cmd text trace, after it got
dropped along with wlauto sub-tree. There are minor differences from the
old WA2 parser.

- Changed to work with devlib start/stop markers
- TraceCmdTrace renamed to TraceCmdParser
- The file path is now passed to the parse() method rather than
  on creation.
- detect whether markers are present in the trace and do not filter
  if they aren't
2017-05-25 11:32:42 +01:00
Sergei Trofimov
ac86304f35 idle: do not attempt to turn off screen on Linux
In the teardown, if screen_off was not set, only ensure that the
screen is on for Android targets.
2017-05-15 10:54:13 +01:00
Sergei Trofimov
f1804300d4 idle: makes sure screen is off if was off before
In the case where the device screen was off prior to the execution of
the workload, but the user did not set screen_off, the screen will be
turned on during the setup. Previously, it would remain on for the
subsequent execution, however the correct behavior is for the workload
to always restore the screen to its previous state.
2017-05-15 10:46:21 +01:00
Sergei Trofimov
e7290c3f14 idle: Add idle workload.
Added a workload that idles on target. For Android targets, there are
options for turning off the screen and/or Android services while idling.
2017-05-15 10:32:36 +01:00
Sergei Trofimov
04253b28c2 Fix typo. 2017-05-12 11:11:40 +01:00
Sergei Trofimov
e68d4fa2d1 trace-cmd: adding an instrument to collect kernel trace
This is the re-implementation of WA2's trace-cmd instrument that
utilizes devlib's ftrace collector. It allows collecting a trace of
kernel events.
2017-05-12 10:42:33 +01:00
Sergei Trofimov
83bf7e1510 plugin_cache: adding missing cfg_points definition 2017-05-12 09:28:59 +01:00
Sergei Trofimov
53d29bf3cf plugin: removing virtual referencies from meta
Remove referencies to "virtual" methods (that no longer exist) from the
plugin metaclass.
2017-05-11 09:57:38 +01:00
Sergei Trofimov
2bbe300dc2 tests: moved out of wa package
Tests now reside in the root of the repo, rather than in wa package.
This means they will no longer packaged and installed in user
deployments (they're only useful for developers).
2017-04-27 17:36:44 +01:00
Sergei Trofimov
6a5dda9bfb wa: removing log import from top-level __init__.py
This import no longer exists. Should be imported from utils instead.
2017-04-27 17:35:42 +01:00
Sergei Trofimov
2dd56990bb tests: removing stale test file
This file was never used (due to being incorrectly named) and contains
references to APIs that no longer exit.
2017-04-27 17:30:21 +01:00
Sergei Trofimov
4f33c98d0b Move misc instrumentation
Moved form a directory into a properly named file.
2017-04-27 09:01:21 +01:00
Sergei Trofimov
d96febb035 Remove execution and runner tests.
That part of the framework has been completely rewritting so the old
tests no longer make sense.
2017-04-27 09:01:20 +01:00