1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 19:32:34 +01:00

Added support for YAML configs

Config files (the default one in ~/.workload_automation plus ones
specified with -c) can now be written using YAML syntax as well as
Python.
This commit is contained in:
Sergei Trofimov
2015-06-18 11:34:32 +01:00
parent 90c0ed281d
commit c076a87098
3 changed files with 40 additions and 20 deletions

View File

@@ -88,9 +88,11 @@ class RunCommand(Command):
self.logger.debug('Updating agenda to disable {}'.format(itd))
agenda.config['instrumentation'].append('~{}'.format(itd))
file_name = 'config_{}.py'
basename = 'config_'
for file_number, path in enumerate(settings.get_config_paths(), 1):
shutil.copy(path, os.path.join(settings.meta_directory, file_name.format(file_number)))
file_ext = os.path.splitext(path)[1]
shutil.copy(path, os.path.join(settings.meta_directory,
basename + str(file_number) + file_ext))
executor = Executor()
executor.execute(agenda, selectors={'ids': args.only_run_ids})