From db9f694dfbc740bef75b6c60dc39b87b165a6565 Mon Sep 17 00:00:00 2001 From: Javi Merino Date: Fri, 26 Aug 2016 15:24:26 +0100 Subject: [PATCH] libs/wlgen/workload: fix background execution for Android targets Commit c83009d8fc9c ("libs/wlgen/workload: fix background execution when CGroups are in use") changed the command for a Workload that runs in the background from target.background() to target.kick_off(). Sadly, target.kick_off() is broken for Android targets, see ARM-software/devlib#55 [0]. As c83009d8fc9c only talked about problems with cgroups and target.background(), probably due to interactions with cgroup_run_into.sh . As a compromise, run target.kick_off() for cgroup and target.background() if cgroup is not set. [0] https://github.com/ARM-software/devlib/issues/55 --- libs/wlgen/wlgen/workload.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/wlgen/wlgen/workload.py b/libs/wlgen/wlgen/workload.py index 5cac67544..78cf8a64b 100644 --- a/libs/wlgen/wlgen/workload.py +++ b/libs/wlgen/wlgen/workload.py @@ -226,7 +226,10 @@ class Workload(object): # Start task in background if required if background: logging.debug('%14s - WlGen [background]: %s', 'WlGen', self.command) - self.target.kick_off(self.command, as_root=as_root) + if cgroup: + self.target.kick_off(self.command, as_root=as_root) + else: + self.target.background(self.command, as_root=as_root) self.output['executor'] = '' # Start task in foreground -- GitLab