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

419 Commits

Author SHA1 Message Date
Marc Bonnici
98de37807d fw/version: Change format of version to conform with PEP440
When installing from source WA attempts to include the commit ID in the
version of the installed pacakge however this caused issues with package
managers like pip. PEP440 specifies that local identifiers must be in the
form `<public version identifier>[+<localversion label>]` so update the
version to conform.

https://www.python.org/dev/peps/pep-0440/#local-version-identifiers
2018-06-27 11:41:24 +01:00
Marc Bonnici
22fcc42903 fw/core: Correct parameter description 2018-06-25 18:19:30 +01:00
Marc Bonnici
c255576fd7 fw/core: Allow for a user_directory to be specified using ~
Previously if a path for the `user_directory` was specified using `~`
this would not be expanded causing issues due to incorrect path joining.
2018-06-25 13:45:43 +01:00
Sergei Trofimov
3ecc46b662 fw/exec: ensure correct state on early abort
Ensure the serialized state gets written out in case of early abort
(before the run has been fully initialized and job execution has
started), and  that the appropriate final output is generated.

This requires that ExecutionContext is created much earlier (in order
for postamble to be possible), and that KeyboardInteruptException is
caught and handled properly by the Executor.
2018-06-22 18:04:16 +01:00
Sergei Trofimov
d0dd6c1e04 fw/exec: context: add write_job_specs
Add a method to encapsulate the writing of ConfigManager's job specs
into run_output.
2018-06-22 18:04:16 +01:00
Sergei Trofimov
861dff75d4 fw/exec: context: add write_output()
Add a convenience method for invoking write_info(), write_state(), and
write_result() of run_output. This will make it easier to call it from
multiple places.
2018-06-22 18:04:16 +01:00
Sergei Trofimov
1b498fa42d fw/exec: context: make target_info a property
TargetManger.get_target_info() gets invoked twice: first on context
creation, and then a second lime shortly afterwards to populate
RunOutput. Change target_info attribute inside the context to be a
property that redirects to run_output. This will allow the context to be
created earlier, before a target connection  is available.
2018-06-22 18:04:16 +01:00
Sergei Trofimov
8da911e9d5 fw/target: add initialize() to TargetManger
Add explicit initialization to TargetManger in order to separate the
creation of the TargetManger form connection to the target.
2018-06-22 18:04:16 +01:00
Sergei Trofimov
0f2bd28284 fw/output: record wa/devlib version in output
Add wa and devlib versions to RunOutput's metadata on creation. They
already get logged, but this will make them readily accessible to
scripts and output processors.
2018-06-20 10:04:18 +01:00
Sergei Trofimov
9f06950fb1 fw/target: account for platform_target_defaults
When iterating over PLATFORMS tuples, account for the
platform_target_defaults introduced by 7470fb5ee.

Also, correct the tuple description in the comments.
2018-06-19 11:23:12 +01:00
Joe Savage
6cc1ac147c framework/workload: Add rerun infrastructure 2018-06-18 10:51:32 +01:00
Sergei Trofimov
bcbde9a197 fw/entrypoint: log devlib version
Log devlib version alongside WA version.
2018-06-15 08:58:39 +01:00
Waleed El-Geresy
488bd57659 framework/version: Redirect git stderr output
Add an stderr argument to redirect errors ('fatal not a git repository'
is the most common) to PIPE so that errors do not output to STDOUT.
2018-06-14 15:07:18 +01:00
Waleed El-Geresy
71a32dd724 framework/command: Fix subparsers in Python3
Make subcommands required arguments in the ComplexCommand class, which
is used by the 'wa create' command.
2018-06-14 15:06:50 +01:00
Waleed El-Geresy
7470fb5ee9 Add target-params to Platform Tuple
Added support for specifying target parameters in the Platform tuple.
2018-06-14 12:06:33 +01:00
Sergei Trofimov
0ca29bb337 fw/entrypoint: make command mandatory for Python 3
Python 3 has changed the behavior of subparsers so that they are no
longer mandatory by default. As a result, executing just "wa" under
Python 3 results in a random error, rather than a help message.

Fix this by making the subparsers mandatory.
2018-06-13 11:08:18 +01:00
Sergei Trofimov
2cb1f47e11 fw/exec: pass context to run started/completed signals
To be consistent with the rest of exec signals.
2018-06-12 16:07:53 +01:00
Sergei Trofimov
ea97372ece fw/exec: add JOB_QUEUE_EXECUTION signals
Add signals just before and just after commencing the execution of the
job queue.
2018-06-12 16:07:53 +01:00
Sergei Trofimov
5f7fde206d fw/instrument: add hostside decorator
Add a decorator to indicate that a callback runs entirely host-side and
does not rely on a connection to the target. This  means it will be
invoked even if the target was detected to be unresponsive.
2018-06-12 16:07:53 +01:00
Sergei Trofimov
2f99137ad5 fw/target: fix signals reboot on unresponsive
- Add "hard" parameter to TargetManager's reboot().
- Pass in context to TargetManager's reboot() and
  verify_target_responsive() -- this is needed for signal dispatch.
- Call self.reboot() instead of self.target.reboot() when attempting a
  reset for unresponsive targets inside TargetManager, in order to
  ensure that appropriate signals are dispatched.
2018-06-12 16:07:53 +01:00
Sergei Trofimov
e816980471 fw/execution: add missing sender in signal
Add the missing sender for RUN_OUTPUT_PROCESSED signal wrap call.
2018-06-12 16:07:53 +01:00
Sascha Bischoff
b6531feb52 framework/instrument: Fix typo for on_job_failure 2018-06-11 15:59:53 +01:00
Marc Bonnici
1879dd62f1 fw/core: Fix description of 'label' CongfigPoint
Update reference of result processors to output processors.
2018-06-11 08:10:07 +01:00
Sergei Trofimov
b3de85455a Add support for Python 3
Add support for running under Python 3, while maintaining compatibility
with Python 2.

See http://python-future.org/compatible_idioms.html for more details
behind these changes.
2018-06-07 14:48:40 +01:00
Marc Bonnici
c3ddb31d4d fw/entrypoint: Fix help information for '--help' argument
In a previous commit we filtered parameters so that '-h' is never passed
to 'parse_known_commands' to ensure our own custom help message is displayed,
now also filter for '--help' for the same reason.
2018-06-07 11:04:29 +01:00
Marc Bonnici
6d9ae419c2 framework/signal: Remove JOB_FINALIZED signal
Remove the currenlty unused JOB_FINALIZED signal as we already have a
WORKLOAD_FINALIZED signal.
2018-06-06 08:38:54 +01:00
Marc Bonnici
baf570fc62 fw/signal: Rename and implement signal for RUN_OUTPUT_PROCESSED
Rename the OVERALL_RESULTS_PROCESSING signal to be called
RUN_OUTPUT_PROCESSED and provide implementation.
2018-06-06 08:38:54 +01:00
Marc Bonnici
b15b937863 fw/parsers: Ensure that a section is a valid dict
Ensure that all section entries are valid dicts otherwise raise an error
informing the user.
2018-06-05 17:54:34 +01:00
Marc Bonnici
2cd355195f fw/rt_config: Fix validation checks
Remove unnecessary validation checks and fix remaining so they don't fail
under certain combinations of parameters.
2018-06-01 15:33:10 +01:00
Marc Bonnici
9035c654bd fw/rt_config: Allow for auto determine 'max' and 'min' for other freqs
Allow users to specify 'max' and 'min' for the maximum and minimum
frequencies to be set for a cpu as well as the current frequency.
2018-06-01 15:33:10 +01:00
Marc Bonnici
e1518e8c5d fw/rt_config: Refactor and fix method calls to resolve 'max'/'min'
Previously incorrect method calls were used to try and convert 'max' and
'min' into their corresponding frequencies, now call the correct methods
and refactor the conversion into a separate method.
2018-06-01 15:33:10 +01:00
Sergei Trofimov
ee3c01418f fw/execution: fix get_resource with strict=False
If strict=False, resolver.get_resource will return None, rather
than raising NotFoundError. Do not attempt to record the md5 hash in
that case.
2018-06-01 14:01:57 +01:00
Marc Bonnici
b14c3d8868 framework/instrument: Fix lefover references to instrument proiorities
Update instrument proiorities to use signal proiorities instead.
2018-05-30 12:23:15 +01:00
Marc Bonnici
703e32e511 framework/signals: Remove unnecessary job signals
Remove overlap of signals between jobs and workload.
2018-05-30 12:23:15 +01:00
Sergei Trofimov
864ded60ae fw/instrument: use signal priorities
Use signal priorities to define priority decorators, rather than
defining own priority enum.
2018-05-30 12:02:28 +01:00
Sergei Trofimov
d79e8324f0 fw/signal: use enum to define priorities
Use an enum rather than a random class to define the priority levels
for the signals.
2018-05-30 12:02:28 +01:00
Sergei Trofimov
42bae98d50 fw/instrument: remove commented code
Remove the commented out mappings from WA2.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
673b61342d fw/instrument: add mappings for job/run signals
Add missing mappings for job and run signals.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
2cad2dbb10 fw/execution: implement abnormal job status signals
Implement signals for failed/aborted jobs.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
e90b12e984 fw/instrument: add job output mappings
Add method name mappings for JOB_OUTPUT_PROCESSED signals.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
b593b7ed59 fw/execution: wrap processors' process_job_output.
Modify execution so that output processors' process_job_output() (but
not export_job_output()) is wrapped by the JOB_OUTPUT_PROCESSED signals.

This makes sense conceptually, and is more useful in practice, as there
are already WORKLOAD_RESULT_EXTRACTION and WORKLOAD_OUTPUT_UPDATE
signals sent by the job, if it's desirable to run before output
processors, but after the job results have been collected.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
43d047eeb5 fw: implement reboot signals
- Wire up reboot signals via the TargetManager
- Add instrument mappings for the same.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
3a6fcd688e fw/signal: rename "boot" to "reboot"
Rename "boot" signals to "reboot", as it would more accurately reflect
how they are used.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
9f36d543e1 fw/instrument: Add log signal maps
Add method name mappings for ERROR_LOGGED and WARNING_LOGGED signals.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
573c6abcb5 fw/signal: add job signals
Add matched signals for before-after job execution. These are the
equivalent of "spec" signals in WA2.
2018-05-29 11:56:39 +01:00
Sergei Trofimov
2ff06af632 fw/execution: record resource hashes in metadata
As part of resolving a resource, record its MD5 hash in the output
metadata. In order to enable this, resource resolution is now done via
the context, rather than directly via the ResourceResolver (in order not
to introduce a context dependency in the Gui object, context now
emulates the resolver interface).
2018-05-25 10:21:06 +01:00
Sergei Trofimov
79141582e9 fw/workload: record app version in metadata
Add the package version for an ApkWorkload to the metadata for that job.
2018-05-25 10:21:06 +01:00
Sergei Trofimov
9257a787f9 fw/output: add metadata attribute to Result
Metadata is a key-value mapping for arbitrary data, similar to
classifiers. Unlike classifiers, metadata does not directly relate to
the results of the execution, but to the execution itself, and typically
would not be processed by Output Processors in the same way as
classifiers. Metadata can also be a lot more free-form in it's value
structure; while classifier values are simple scalars, metadata values
can be arbitrary POD structures.
2018-05-25 10:21:06 +01:00
Marc Bonnici
86ba51be72 framework/execution: Implement each_spec reboot policy
Implement the `each_spec` reboot policy so that the device will be
rebooted if the spec has changed.
2018-05-25 10:02:17 +01:00
Marc Bonnici
f13e3adf99 framework/execution: Fix previous/next job
The next and previous job attribute implementations of context were
swapped.
2018-05-25 10:02:17 +01:00