mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target: Update Target.modules from Target.install_modules()
Make sure the target.modules list stays up to date when a new module is installed, since behaviors like devlib_cpu_frequency event injection rely on content of target.modules.
This commit is contained in:
parent
9661c6bff3
commit
17374cf2b4
@ -906,16 +906,19 @@ class Target(object):
|
|||||||
self.logger.warning(msg)
|
self.logger.warning(msg)
|
||||||
|
|
||||||
def _install_module(self, mod, **params):
|
def _install_module(self, mod, **params):
|
||||||
if mod.name not in self._installed_modules:
|
name = mod.name
|
||||||
self.logger.debug('Installing module {}'.format(mod.name))
|
if name not in self._installed_modules:
|
||||||
|
self.logger.debug('Installing module {}'.format(name))
|
||||||
try:
|
try:
|
||||||
mod.install(self, **params)
|
mod.install(self, **params)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.error('Module "{}" failed to install on target'.format(mod.name))
|
self.logger.error('Module "{}" failed to install on target'.format(name))
|
||||||
raise
|
raise
|
||||||
self._installed_modules[mod.name] = mod
|
self._installed_modules[name] = mod
|
||||||
|
if name not in self.modules:
|
||||||
|
self.modules.append(name)
|
||||||
else:
|
else:
|
||||||
self.logger.debug('Module {} is already installed.'.format(mod.name))
|
self.logger.debug('Module {} is already installed.'.format(name))
|
||||||
|
|
||||||
def _resolve_paths(self):
|
def _resolve_paths(self):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user