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

Updates to pluggins to match the new plugin loader

This commit is contained in:
Sebastian Goscik 2016-03-17 14:16:54 +00:00
parent 913d41c86d
commit 98b46894d8
5 changed files with 8 additions and 7 deletions

View File

@ -296,7 +296,7 @@ def create_workload(name, kind='basic', where='local', check_name=True, **kwargs
class_name = get_class_name(name) class_name = get_class_name(name)
if where == 'local': if where == 'local':
workload_dir = _d(os.path.join(settings.environment_root, 'workloads', name)) workload_dir = _d(os.path.join(settings.user_directory, 'workloads', name))
else: else:
workload_dir = _d(os.path.join(where, name)) workload_dir = _d(os.path.join(where, name))

View File

@ -26,6 +26,7 @@ from wlauto.utils.log import add_log_file
from wlauto.core.configuration import RunConfiguration from wlauto.core.configuration import RunConfiguration
from wlauto.core import pluginloader from wlauto.core import pluginloader
class RunCommand(Command): class RunCommand(Command):
name = 'run' name = 'run'
@ -96,7 +97,7 @@ class RunCommand(Command):
basename = 'config_' basename = 'config_'
for file_number, path in enumerate(settings.config_paths, 1): for file_number, path in enumerate(settings.config_paths, 1):
file_ext = os.path.splitext(path)[1] file_ext = os.path.splitext(path)[1]
shutil.copy(path, os.path.join(meta_directory, shutil.copy(path, os.path.join(config.meta_directory,
basename + str(file_number) + file_ext)) basename + str(file_number) + file_ext))
executor = Executor(config) executor = Executor(config)

View File

@ -358,14 +358,14 @@ class Executor(object):
if status in counter: if status in counter:
parts.append('{} {}'.format(counter[status], status)) parts.append('{} {}'.format(counter[status], status))
self.logger.info(status_summary + ', '.join(parts)) self.logger.info(status_summary + ', '.join(parts))
self.logger.info('Results can be found in {}'.format(settings.output_directory)) self.logger.info('Results can be found in {}'.format(self.config.output_directory))
if self.error_logged: if self.error_logged:
self.logger.warn('There were errors during execution.') self.logger.warn('There were errors during execution.')
self.logger.warn('Please see {}'.format(settings.log_file)) self.logger.warn('Please see {}'.format(self.config.log_file))
elif self.warning_logged: elif self.warning_logged:
self.logger.warn('There were warnings during execution.') self.logger.warn('There were warnings during execution.')
self.logger.warn('Please see {}'.format(settings.log_file)) self.logger.warn('Please see {}'.format(self.config.log_file))
def _get_runner(self, result_manager): def _get_runner(self, result_manager):
if not self.config.execution_order or self.config.execution_order == 'by_iteration': if not self.config.execution_order or self.config.execution_order == 'by_iteration':

View File

@ -751,7 +751,7 @@ class PluginLoader(object):
return (alias_name, {}) return (alias_name, {})
if alias_name in self.aliases: if alias_name in self.aliases:
alias = self.aliases[alias_name] alias = self.aliases[alias_name]
return (alias.plugin_name, alias.parameters) return (alias.plugin_name, alias.params)
raise NotFoundError('Could not find plugin or alias "{}"'.format(alias_name)) raise NotFoundError('Could not find plugin or alias "{}"'.format(alias_name))
# Internal methods. # Internal methods.

View File

@ -124,7 +124,7 @@ class DVFS(ResultProcessor):
self.infile = os.path.join(context.output_directory, 'trace.txt') self.infile = os.path.join(context.output_directory, 'trace.txt')
if os.path.isfile(self.infile): if os.path.isfile(self.infile):
self.logger.debug('Running result_processor "dvfs"') self.logger.debug('Running result_processor "dvfs"')
self.outfile = os.path.join(settings.output_directory, 'dvfs.csv') self.outfile = os.path.join(context.output_directory, 'dvfs.csv')
self.flush_parse_initialize() self.flush_parse_initialize()
self.calculate() self.calculate()
self.percentage() self.percentage()