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

449 Commits

Author SHA1 Message Date
Marc Bonnici
57aa5ca588 fw/version: Add developement tag to version number 2018-09-21 15:06:30 +01:00
Marc Bonnici
a7d0b6fdbd target/descriptor: Do not convert the module list to strings
Change the type of the `modules` to `list` so that additional
configuration can be supplied to individual modules as a dict of values.
2018-09-21 15:06:30 +01:00
Marc Bonnici
7d01258bce fw/target/manager: Do no finalize target if not instantiated
In the case of an error occurring during target initialization do not
try and check for disconnecting upon finalizing.
2018-09-21 15:06:30 +01:00
Marc Bonnici
8cd79f2ac4 fw/instrument: Fix compatibility with Python2
The Python2 inspect module does not contain the `getfullargspec` method so call
the appropriate method depending on Python version.
2018-09-05 15:44:48 +01:00
Waleed El-Geresy
718f2c1c90 Expose context in OP initialize and finalize
Expose the context to the initialize and finalize functions for Output
Processors. This was found to be necessary for the upcoming PostgreSQL
Output Processor.
2018-09-05 14:40:42 +01:00
Marc Bonnici
6366a2c264 framework/version: Specify default encoding when parsing commit id 2018-08-22 14:41:12 +01:00
Marc Bonnici
d858435c3d utils/version: Fix check to only decode bytes
When using Python3 the returned value of the commit is a byte string and
therefore needs to be decoded.
2018-07-27 10:11:32 +01:00
Marc Bonnici
fc226fbb6e fw/execution: Ensure that identifiers are used when retrieving plugins.
Make sure that when retrieving plugin information from the plugin
cache the name is converted to an identifier first.
2018-07-24 11:34:19 +01:00
Sergei Trofimov
e4a856ad03 fw/config: preserve included config files
Save included config files, along with the explicitly-specified config
that included them, under run output's __meta/raw_config/.
2018-07-23 16:47:10 +01:00
Sergei Trofimov
7d833ec112 fw/config: add includes
Add the ability to include other YAML files inside agendas and config
files using "include#:" entries.
2018-07-23 16:47:10 +01:00
Marc Bonnici
b729f7c9e4 fw/parsers: Ensure plug-in names are converted to an identifier
Ensure that a plug-ins config entry is converted to an identifier before being
stored in the PluginCache so that the relevant configuration can be
retrieved appropriately. For example this allows for both 'trace-cmd' and
'trace_cmd' to be used as config entries to provide configuration for the
'trace-cmd' plugin.
2018-07-19 17:15:26 +01:00
Sergei Trofimov
e8f545861d fw: cache target info
Cache target info after pulling it from the device. Attempt to retrieve
from cache before querying target.
2018-07-13 15:53:01 +01:00
Sergei Trofimov
770d2b2f0e fw: add cache subdir under $WA_USER_DIRECTORY
Add a sub-directory for caching stuff.
2018-07-13 15:53:01 +01:00
Sergei Trofimov
dacb350992 fw/target: add system_id to TargetInfo
Add target's system_id to TargetInfo. This ID is intended to be unique
of the combination of hardware and software on the target.
2018-07-13 13:28:50 +01:00
Sergei Trofimov
ce93823967 fw/execution: write config after installing augs
Add Context.write_config() to write the combined config into run output
__meta. Use it after instruments and result processors get installed to
make sure their configuration gets serialized in the output.
2018-07-11 13:28:04 +01:00
Sergei Trofimov
7755363efd fw/config: add get_config() to ConfigManager
Add a method to allow obtaining the combined config after config
manager has been finalized.
2018-07-11 13:28:04 +01:00
Sergei Trofimov
bcea1bd0af fw/config: add resource getter to run config
Track resource getter configuration as part of the run config.
2018-07-11 13:28:04 +01:00
Sergei Trofimov
a062a39f78 fw/config: add installed aug configs to run config
Track configuration used for installed augmentations inside RunConfig.
2018-07-11 13:28:04 +01:00
Sergei Trofimov
b1a01f777f fw/execution: rename things for clarity
- Rename "instrument_name" to "instrument" inside do_execute(), as
  ConfigManger.get_instrument() returns a list of Instrument objects,
  not names.
- To avoid name clash, rename the imported instrument module to
  "instrumentation".
2018-07-11 13:28:04 +01:00
Marc Bonnici
e485b9ed39 utils/version: do not decode bytes
Check that the resulting output inside get_commit() is a str before
attempting to decode it when running on Python 3.
2018-07-11 10:39:38 +01:00
Marc Bonnici
5714c8e6a1 wa: Additional pylint fixes 2018-07-10 12:56:51 +01:00
Sergei Trofimov
fd1dd789bf fw/output: update internal state on write_config()
Update the internal _combined_config object with the one that
has been written to ensure that the serialized and run time states are
the same.
2018-07-09 16:00:07 +01:00
Sergei Trofimov
c410d2e1a1 I lint, therefore I am
Implement fixes for the most recent pylint version.
2018-07-09 15:59:40 +01:00
Marc Bonnici
925bc8b719 wa: pep8 fixes 2018-07-06 14:39:41 +01:00
Sergei Trofimov
03eafe6b33 framework: pep8 fixes
Fix issues reported by flake8.
2018-07-06 14:39:41 +01:00
Sergei Trofimov
f74b7ae78c framework: fix pylint issues
Fix/disable checks for issues reported by pylint under wa/framework.
2018-07-06 14:39:41 +01:00
Sergei Trofimov
8878cc20d4 Update copyright headers.
- Add copyright headers to files that did not already have them
- Update the year to the last year the file was modified in files with
  existing headers.
2018-07-04 16:33:31 +01:00
Marc Bonnici
5231bbcf71 fw/exception: Add 'message' property to SerializerSyntaxError
Allow for the fact that Exceptions do not have a message attribute in
Python3 so mimic the functionality.
2018-07-04 11:54:17 +01:00
Marc Bonnici
1648a58c11 framework/workload: Add check for platform
Remove unused ``platform`` attributes and add ``supported_platforms``
along with check so that workloads can fail early when attempting to run
on an incorrect platform.
2018-07-02 12:11:00 +01:00
Sergei Trofimov
e55f48089b fw/output: expose metadata
Expose result.metadata as a property of the output.
2018-06-29 17:25:29 +01:00
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