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

759 Commits

Author SHA1 Message Date
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
Sergei Trofimov
1b2373f5a5 Fix utils tests
- added missing import to types
- removed tests for TreeNode (no longer exists)
2017-04-27 09:01:20 +01:00
Sergei Trofimov
a147fa3350 Fix Plugin and tests
WA2 Extensions had two features that have proven more trouble then they
are worth, and so they were removed from WA3 Plugins:

- Virtual methods (methods that automatically invoked super's version
  without having to explicitly do that).
- It used to be possible to use strings or tuples to specify parameters
  for extensions, and those were automatically "promoted" to Parameter
  instances by the metaclass. This feature was never actually used.

This commit cleans up residual code for these features from Plugin
implementations and removes tests that used to exercise them.
2017-04-27 09:01:19 +01:00
Sergei Trofimov
b7710b40af tests: fix config tests
- correct the import for merge_config_values fuction
- fixed expected result for set-with-list case; sequence merge will
  produce unique values.
- check that the merge result type matches the other's type
2017-04-27 09:01:18 +01:00
Sergei Trofimov
4d964ccb2f commands: renaming record.py to revent.py
This file contians implementations of both record and replay commands
for revent so the old name was misleading.
2017-04-27 09:01:18 +01:00
Sergei Trofimov
867972f742 removing old files
Removing old and unsused files:

- wa/framework/old_output.py: superseded by output.py in the same dir
- the entire wlauto tree: replaced by wa/ tree; it's stale by now
  anyway.
- log.py and actor.py from framework/ as neither is used.
2017-04-27 09:01:17 +01:00
Sergei Trofimov
0e5f7eb724 tests: update old import from wlauto
exec_control tests were still importing from wlauto rather than wa. This
rectifies that.
2017-04-26 14:27:26 +01:00
Sergei Trofimov
f8d5a3e358 target/descriptor: fix assistant params handling
assistant_params are now handled consistently with the other kinds of
params in TargetDescription, and they are now part of the default config
generated.
2017-04-26 13:56:12 +01:00
setrofim
63b01e29ee Merge pull request #381 from marcbonnici/revent
Revent & Misc Fixes
2017-04-25 10:39:41 +01:00
Marc Bonnici
16a0e84469 Runner: Now finalizes all completed workloads at the end of a run.
Previously when finalizing a run the workloads themselves were not included.
This ensures that each completed workloads finalize method is called.
2017-04-25 10:35:02 +01:00
Marc Bonnici
16f2bc69f0 Replay Command: Added a replay command
The replay command can be used to replay an revent recording on a device.
2017-04-25 10:35:02 +01:00
Marc Bonnici
311ac1b803 Record Command: Updated record command
Updated the record command to allow revent recordings to be made.
They can be performed in 3 ways; the default is a standard recording
as in WA2, it can start a specified package before starting the
recording or a workload can be specified which launches the workload
and prompts the user to record each stage, naming and storing the recordings
appropriately.
2017-04-25 10:35:02 +01:00
Marc Bonnici
3ad0c67c63 AngrybirdsRio: Added revent workload 2017-04-25 10:35:02 +01:00
Marc Bonnici
4b84a68038 Workload: Added ReventWorkload and updated ReventGUI
Added a new ReventWorkload as a base for revent based workloads.
Updated ReventGui to use `revent_recorder` and now uses `target.model`
instead of `taget.name`.
2017-04-25 10:35:02 +01:00
Sergei Trofimov
8a9ca6fdfe commands: added create ageanda command
Added the crate command with a subcommand to generate an agenda based on
a list of plugins.
2017-04-25 08:16:36 +01:00
Sergei Trofimov
f1eeff726f TargetDescription: generate default config
Added a method to TargetDescrition to generate a dict with the default
config for that description.
2017-04-25 08:16:36 +01:00
Sergei Trofimov
386dede4a8 command: added support for sub-commands 2017-04-25 08:16:35 +01:00
Marc Bonnici
adaa83b6eb ReventUtils: Added ReventRecorder
Added `ReventRecorder` which is used to deal with the revent binary
on the device including deloyment, running commands and cleaning up
again.
2017-04-21 10:49:20 +01:00
Marc Bonnici
9308855f14 TargetDescriptor: Now adds parameters with default values.
Previously if a parameter was not specified via config it would not
be used during initialisation even if the parameter had a default
value. Now any parameters with default values are populated as necessary.
2017-04-21 10:49:20 +01:00
Marc Bonnici
6f0d18f921 Executor: Renamed device_manage to self.target_manager 2017-04-21 10:49:20 +01:00
Marc Bonnici
7815df59d4 Getters: Added support for finding revent files.
Revent files are automatically placed in the sub folder `revent_files` in the
workload directory when recording, therefore when trying to retrieve recordings
the getter now looks inside of the sub directory.
2017-04-21 10:49:20 +01:00
Marc Bonnici
2406d01672 Exec Control: Copied to WA3 and now uses default environment.
Moved execution decorators from wlauto to wa.
Modified to use a default environment if none is explicitly specified.
2017-04-20 14:27:25 +01:00
Marc Bonnici
cceecebfa7 Getters: Renamed import from __base_filepath to _base_filepath
Previously trying to use the `__base_filepath` import from inside the `Package`
class, resulted in the error "`_Package__base_filepath` is not defined."
2017-04-20 11:49:53 +01:00
Marc Bonnici
b7ed59edcf Execution: Corrected spelling 2017-04-20 11:49:53 +01:00
Marc Bonnici
a17e11251e Workload: Corrected doc string 2017-04-20 11:49:53 +01:00
Marc Bonnici
e60e31ff8e Imports: Updated Imports
Switch remaining wlauto imports to wa.
Added other missing imports.
2017-04-20 11:49:53 +01:00
Sergei Trofimov
bddabbc56d revent workload part 1 2017-04-06 16:38:39 +01:00
Marc Bonnici
11323b6256 TM: Update and Refactor
TM has been updated and restructured to be clearer, including splitting off
assistant and creating a runtime parameter manager into their own files.
2017-04-05 11:51:29 +01:00
Marc Bonnici
519389859e Misc Utils: Fixed 'merge_dicts_simple'
Previously this function was ignoring the `other` parameter
and therefore not actually merging the two dictionaries.
2017-03-31 17:42:33 +01:00
Sergei Trofimov
18e7ffb826 workload: adding basic UIAutomator workload implementation
Added a workload type to handle workloads that have both an APK with an
application and associated automation JAR. Added benchmarkpi
implementation using using the new workload.
2017-03-29 09:55:40 +01:00
Sergei Trofimov
fed454fc74 getters: fix some issues
- get_by_extension was comparing the expected extension to the entire
  tuple returned by os.path.splitext(), rather than just the extension
  part.
- UserDirectory getter was looking in the root dependencies directory,
  rather than the subdirectory for the owner.
- Filer getter was not handling non-existing paths properly.
2017-03-29 09:53:27 +01:00
Sergei Trofimov
4006e998c2 output: fix JobOutput instantiation
iteration and label parameters were being passed in the wrong order when
instantiating JobOutput.
2017-03-29 09:53:27 +01:00
Sergei Trofimov
0032e347fe Implemeting target assistants
- Workload's update_result stage has now been broken up into two parts:
  extract_results and update_output. This is to allow the assistant to
  pull output from the target in between the two stages.
- Updated assistant implementations for Linux and Android targets from
  the exisiting code.
- Extended target descriptor code to handle assistants and their
  parameters as well.
- Updated  the target manager to actually make use of the assistants.
2017-03-29 09:53:27 +01:00
Marc Bonnici
861db1cf38 Resource: Removed stray ':' 2017-03-22 16:10:06 +00:00
Marc Bonnici
07362a5d05 Core: Fixed config point validation
Previously a config point would try to validate the name attribute of the object
it was meant to be setting, rather than what it was meant to be setting it to.
2017-03-22 15:57:47 +00:00
Marc Bonnici
82acc16a7d Config Core: Corrected Spelling 2017-03-22 15:57:47 +00:00
Marc Bonnici
f175e63bc5 Parsers: Fixed spelling and error message 2017-03-22 15:57:47 +00:00
Marc Bonnici
5c01e84077 Parsers: Corrected parameter name. 2017-03-22 15:57:47 +00:00
Marc Bonnici
1043569170 Descriptor: Added import and corrected spelling 2017-03-22 15:57:47 +00:00
Sergei Trofimov
9c091f5339 Misc minor fixes. 2017-03-22 15:17:14 +00:00
Sergei Trofimov
ebf917a8a9 Added filer, http and user directory resource getters. 2017-03-22 15:16:37 +00:00
Sergei Trofimov
84c1fc2bcf Updated dhrystone to use the new resource resoultion mechanics. 2017-03-22 15:16:37 +00:00
Sergei Trofimov
15886ffa29 Streamline resource resolution mechanics. 2017-03-22 15:16:37 +00:00
Sergei Trofimov
1d0db35e04 Fix timstampts to be UTC. 2017-03-22 15:14:44 +00:00
Sergei Trofimov
31a5e5b5fe Implment output processing
- Implemented result processor infrastructured
- Corrected some status tracking issues (differed between states
  and output).
- Added "csv" and "status" result processors (these will be the default
  enabled).
2017-03-22 15:14:44 +00:00
Sergei Trofimov
ff990da96c Removing duplicate log line 2017-03-20 16:28:21 +00:00
Sergei Trofimov
9ba126d46d dhrystone: fixed taskset_mask description. 2017-03-20 14:44:34 +00:00
Sergei Trofimov
1c4eef54d6 Tidying run_config config points 2017-03-20 14:40:13 +00:00
Sergei Trofimov
482a936639 Implement job skipping on abort 2017-03-17 17:29:30 +00:00
Sergei Trofimov
24ade78c36 The old Runner can die now; RIP 2017-03-17 17:10:30 +00:00
Sergei Trofimov
326ab827ed Implement Executor's postamble 2017-03-17 17:05:40 +00:00
Sergei Trofimov
add6dafa2d job: upped logging level of loading message to info 2017-03-17 16:30:11 +00:00
Sergei Trofimov
c5cd2b9298 Initial priority implementation
- Fixed up some of the signal map for instrumentation
- Changed how priorites are specified -- no longer method name prefixes
  but dedicated decorators, including an easy way of specifying a custom
  priority level (no longer need to manually connect signals)
- Updated ExecutionTimeInstrument to work with the new system
- Also removed some dead code
2017-03-17 16:21:14 +00:00
Sergei Trofimov
4287e90153 dhrystone tidy 2017-03-17 09:36:35 +00:00
Sergei Trofimov
24402660c4 Initial implementation of state tracking and output handling. 2017-03-17 09:15:43 +00:00
Sergei Trofimov
a60e8b0ba6 log: fixing file logger format
The file logger format mistakenly fixed message width to 10 chars,
whereas logger name should have been fixed and message unconstrained.
2017-03-15 17:18:13 +00:00
Sergei Trofimov
87560550d9 Revert "New target description + moving target stuff under "framework""
This reverts commit 6eb5c3681d.

was commited in error.
2017-03-15 17:16:59 +00:00
Sergei Trofimov
ec109f5d0b fixing "params" handling in section entries
"params" is interpreted differently in section vs workload entires in
the agenda; previously, this was handled in the generic entry
construciton function by examining the ID prefix of the entry to
distinguish between the two.

This is unreliable as the user may specify their own IDs that won't have
the expected prefixes. To handle this, the "params" alias resolution for
sections is now handled in section specific part of entry processing
(workloads are handled autmatically because that is the default for
the corresponding JobConfig config point).
2017-03-15 14:34:31 +00:00
Sergei Trofimov
ccdc3492e7 Handle retry failed 2017-03-15 14:34:31 +00:00
Sergei Trofimov
547ae1c10e Job output dir handling. 2017-03-15 14:34:23 +00:00
Sergei Trofimov
011fd684bd Skeleton job execution 2017-03-15 14:34:23 +00:00
Sergei Trofimov
6eb5c3681d New target description + moving target stuff under "framework"
Changing the way target descriptions work from a static mapping to
something that is dynamically generated and is extensible via plugins.
Also moving core target implementation stuff under "framework".
2017-03-15 14:34:12 +00:00
Sergei Trofimov
3885a93b60 Fixed multiple connects
Target was implicitly connecting on instantiation, and then explicitily
re-connected by the TargetManger.
2017-03-07 15:29:49 +00:00
Sergei Trofimov
d9458c8767 Integerated new target stuff into execution so far 2017-03-07 15:17:23 +00:00
Sergei Trofimov
42539bbe0d New target description + moving target stuff under "framework"
Changing the way target descriptions work from a static mapping to
something that is dynamically generated and is extensible via plugins.
Also moving core target implementation stuff under "framework".
2017-03-06 11:10:25 +00:00
Marc Bonnici
c1ca2f98fe Renamed methods 2017-02-21 15:41:30 +00:00
Marc Bonnici
c53242046a Removal of some old version of code. 2017-02-21 15:15:08 +00:00
Marc Bonnici
d99451c8e4 Target Manager Intial Commit 2017-02-21 15:02:28 +00:00
Marc Bonnici
1f1f2b12c6 WA3 Exsisting Code 2017-02-21 15:02:28 +00:00