1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-22 12:58:36 +00:00

RuntimeConfig: Handle initialisation failure of RT plugin

Previously if one of the runtime parameters failed to initialize it would cause
the the entire setup process to fail. Now if an error is encountered e.g. a core
went offline when trying to read its information, that particular parameter will
be disabled along with it's supported parameters. This means that only if a user
attempts to use the RT parameter will execution be stopped however it will raise
a potentially misleading unsupported parameter error.
This commit is contained in:
Marc Bonnici 2017-06-13 11:50:53 +01:00
parent 279ed6a2c9
commit d7dcbcae92

View File

@ -26,6 +26,7 @@ class RuntimeParameter(Parameter):
class RuntimeConfig(Plugin): class RuntimeConfig(Plugin):
name = None
kind = 'runtime-config' kind = 'runtime-config'
@property @property
@ -41,7 +42,12 @@ class RuntimeConfig(Plugin):
self.target = target self.target = target
self._target_checked = False self._target_checked = False
self._runtime_params = {} self._runtime_params = {}
try:
self.initialize() self.initialize()
except TargetError:
msg = 'Failed to initialize: "{}"'
self.logger.debug(msg.format(self.name))
self._runtime_params = {}
def initialize(self): def initialize(self):
raise NotImplementedError() raise NotImplementedError()