From 10435691700da5d7e3255ab3763dc6e5be7df597 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 7 Mar 2017 17:05:58 +0000 Subject: [PATCH 1/6] Descriptor: Added import and corrected spelling --- wa/framework/target/descriptor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wa/framework/target/descriptor.py b/wa/framework/target/descriptor.py index c1252289..717df67d 100644 --- a/wa/framework/target/descriptor.py +++ b/wa/framework/target/descriptor.py @@ -8,7 +8,7 @@ from wa.framework import pluginloader from wa.framework.exception import PluginLoaderError from wa.framework.plugin import Plugin, Parameter from wa.utils.types import list_of_strings, list_of_ints - +from wa.utils.misc import isiterable def get_target_descriptions(loader=pluginloader): targets = {} @@ -18,7 +18,7 @@ def get_target_descriptions(loader=pluginloader): if desc.name in targets: msg = 'Duplicate target "{}" returned by {} and {}' prev_dtor = targets[desc.name].source - raise PluginLoaderError(msg.format(dsc.name, prev_dtor.name, + raise PluginLoaderError(msg.format(desc.name, prev_dtor.name, descriptor.name)) targets[desc.name] = desc return targets.values() @@ -290,4 +290,3 @@ class DefaultTargetDescriptor(TargetDescriptor): raise ValueError('Unexpected default "{}"'.format(name)) param_map[name].default = value return cls, param_map.values() - From 5c01e84077884ad0dcdf594b4750f5f05d500e17 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 14 Mar 2017 15:47:15 +0000 Subject: [PATCH 2/6] Parsers: Corrected parameter name. --- wa/framework/configuration/parsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/framework/configuration/parsers.py b/wa/framework/configuration/parsers.py index d57b1bc8..7af4d25f 100644 --- a/wa/framework/configuration/parsers.py +++ b/wa/framework/configuration/parsers.py @@ -155,7 +155,7 @@ class AgendaParser(object): for section in sections: workloads = [] for workload_entry in section.pop("workloads", []): - workload = _process_workload_entry(workload_entry, seen_workload_ids, + workload = _process_workload_entry(workload_entry, seen_wkl_ids, state.jobs_config) workloads.append(workload) From f175e63bc55cb5f1465fc5102d9449b4dd904cba Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 14 Mar 2017 16:40:37 +0000 Subject: [PATCH 3/6] Parsers: Fixed spelling and error message --- wa/framework/configuration/parsers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wa/framework/configuration/parsers.py b/wa/framework/configuration/parsers.py index 7af4d25f..303a6735 100644 --- a/wa/framework/configuration/parsers.py +++ b/wa/framework/configuration/parsers.py @@ -224,8 +224,8 @@ def _pop_aliased(d, names, entry_id): name_count = sum(1 for n in names if n in d) if name_count > 1: names_list = ', '.join(names) - msg = 'Inivalid workload entry "{}": at moust one of ({}}) must be specified.' - raise ConfigError(msg.format(workload_entry['id'], names_list)) + msg = 'Invalid workload entry "{}": at most one of ({}}) must be specified.' + raise ConfigError(msg.format(entry_id, names_list)) for name in names: if name in d: return d.pop(name) From 82acc16a7de3b40f6d7a1070823d1214bae7d63d Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 21 Mar 2017 15:23:10 +0000 Subject: [PATCH 4/6] Config Core: Corrected Spelling --- wa/framework/configuration/core.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py index 04924397..7eb5c69e 100644 --- a/wa/framework/configuration/core.py +++ b/wa/framework/configuration/core.py @@ -128,7 +128,7 @@ class LoggingConfig(dict): self['color'] = config.pop('colour_enabled', self.defaults['color']) # legacy self['color'] = config.pop('color', self.defaults['color']) if config: - message = 'Unexpected logging configuation parameters: {}' + message = 'Unexpected logging configuration parameters: {}' raise ValueError(message.format(bad_vals=', '.join(config.keys()))) elif config is None: for k, v in self.defaults.iteritems(): @@ -401,7 +401,7 @@ class RuntimeParameterManager(object): """ Validate values that do not require a active device connection. This method should also pop all runtime parameters meant for this manager - from params, even if they are not beign statically validated. + from params, even if they are not being statically validated. """ pass @@ -743,7 +743,7 @@ class RunConfiguration(Configuration): default=['FAILED', 'PARTIAL'], allowed_values=Status.values[Status.RUNNING.value:], description=''' - This is list of statuses on which a job will be cosidered to have + This is list of statuses on which a job will be considered to have failed and will be automatically retried up to ``max_retries`` times. This defaults to ``["FAILED", "PARTIAL"]`` if not set. Possible values are:: @@ -758,7 +758,7 @@ class RunConfiguration(Configuration): The workload itself has failed. ``"ABORTED"`` - The user interupted the workload + The user interrupted the workload ''', ), ConfigurationPoint( @@ -799,7 +799,7 @@ class RunConfiguration(Configuration): """ # pylint: disable=no-member if self.device is None: - msg = 'Attemting to merge device config with unspecified device' + msg = 'Attempting to merge device config with unspecified device' raise RuntimeError(msg) self.device_config = plugin_cache.get_plugin_config(self.device, generic_name="device_config") @@ -1068,7 +1068,7 @@ def create_job_spec(workload_entry, sections, target_manager, plugin_cache, # PHASE 2.2: Merge global, section and workload entry "workload_parameters" job_spec.merge_workload_parameters(plugin_cache) - # TODO: PHASE 2.3: Validate device runtime/boot paramerers + # TODO: PHASE 2.3: Validate device runtime/boot parameters job_spec.merge_runtime_parameters(plugin_cache, target_manager) target_manager.validate_runtime_parameters(job_spec.runtime_parameters) From 07362a5d05e9ab5d5e3145a60ce4d24ecaa78cba Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 21 Mar 2017 13:23:31 +0000 Subject: [PATCH 5/6] 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. --- wa/framework/configuration/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py index 7eb5c69e..b1af03a9 100644 --- a/wa/framework/configuration/core.py +++ b/wa/framework/configuration/core.py @@ -267,7 +267,7 @@ class ConfigurationPoint(object): article = get_article(typename) raise ConfigError(msg.format(value, self.name, article, typename)) if value is not None: - self.validate_value(obj.name, value) + self.validate_value(self.name, value) if self.merge and hasattr(obj, self.name): value = merge_config_values(getattr(obj, self.name), value) setattr(obj, self.name, value) From 861db1cf38f37fb8cfbdf2d90a4fda6b4c3cebf0 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Wed, 22 Mar 2017 16:05:49 +0000 Subject: [PATCH 6/6] Resource: Removed stray ':' --- wa/framework/resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/framework/resource.py b/wa/framework/resource.py index 1167b14c..2ce9de7f 100644 --- a/wa/framework/resource.py +++ b/wa/framework/resource.py @@ -155,7 +155,7 @@ class ApkFile(Resource): version_matches = apk_version_matches(path, self.version) if self.variant is not None: name_matches = file_name_matches(path, self.variant) - return name_matches and version_matches: + return name_matches and version_matches def __str__(self): text = '<{}\'s apk'.format(self.owner)