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

40 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Marc Bonnici
c455ad524f Parser: Fixes raising duplicate entry error. 2017-07-25 16:08:17 +01:00
Marc Bonnici
3a376525cd PluginCache: Fixed Typo 2017-07-10 11:08:43 +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
Marc Bonnici
3662686b3f Core: Misc formatting fixes 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
c0f5d36b9b PluginCache: Add name to duplicate source error 2017-06-12 14:57:55 +01:00
Sergei Trofimov
83bf7e1510 plugin_cache: adding missing cfg_points definition 2017-05-12 09:28:59 +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
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
Sergei Trofimov
15886ffa29 Streamline resource resolution mechanics. 2017-03-22 15:16:37 +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
1c4eef54d6 Tidying run_config config points 2017-03-20 14:40:13 +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
24402660c4 Initial implementation of state tracking and output handling. 2017-03-17 09:15:43 +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
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
1f1f2b12c6 WA3 Exsisting Code 2017-02-21 15:02:28 +00:00