1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +00:00

config/execution: Raise better error if no workloads specified.

If WA is ran without any workloads being specified, previously an index
error was thrown, now check that at least one global workload has been
specified and if not, provide a more helpful error message.
This commit is contained in:
Marc Bonnici 2018-04-11 17:51:04 +01:00 committed by setrofim
parent 5664d312eb
commit 98d9dd080c

View File

@ -87,6 +87,10 @@ class AgendaParser(object):
self._populate_and_validate_config(state, raw, source)
sections = self._pop_sections(raw)
global_workloads = self._pop_workloads(raw)
if not global_workloads:
msg = 'No jobs avaliable. Please ensure you have specified at '\
'least one workload to run.'
raise ConfigError(msg)
if raw:
msg = 'Invalid top level agenda entry(ies): "{}"'