From c4e46b7c26a8b8a6daef115e97186aae06bc3a60 Mon Sep 17 00:00:00 2001 From: Patrick Bellasi Date: Fri, 13 May 2016 18:15:51 +0100 Subject: [PATCH] target: add a "setup" stage for modules initialisation Some modules could requires assets available on a target before being initialised. For example, the cgroups module requires busybox and shutil to properly initialise. This patch adds a new stage to Target which allows to post-pone the initialisation of some modules till Target.setup() has been executed. Signed-off-by: Patrick Bellasi --- devlib/target.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devlib/target.py b/devlib/target.py index 01f3bb8..ed7a248 100644 --- a/devlib/target.py +++ b/devlib/target.py @@ -216,6 +216,9 @@ class Target(object): for host_exe in (executables or []): # pylint: disable=superfluous-parens self.install(host_exe) + # Initialize modules which requires Buxybox (e.g. shutil dependent tasks) + self._update_modules('setup') + def reboot(self, hard=False, connect=True, timeout=180): if hard: if not self.has('hard_reset'):