diff --git a/libs/wlgen/wlgen/workload.py b/libs/wlgen/wlgen/workload.py index 79de745e8204f322aa9dc4baf3fa49900e546f2b..5ef334826a647b2d05bae0be14a0c984bb695836 100644 --- a/libs/wlgen/wlgen/workload.py +++ b/libs/wlgen/wlgen/workload.py @@ -226,17 +226,20 @@ class Workload(object): # Start task in background if required if background: logging.debug('%14s - WlGen [background]: %s', 'WlGen', self.command) - self.target.background(self.command, as_root=as_root) - return + self.target.kick_off(self.command, as_root=as_root) + self.output['executor'] = '' + + # Start task in foreground + else: - logging.info('%14s - Workload execution START:', 'WlGen') - logging.info('%14s - %s', 'WlGen', self.command) + logging.info('%14s - Workload execution START:', 'WlGen') + logging.info('%14s - %s', 'WlGen', self.command) - # Run command and wait for it to complete - results = self.target.execute(self.command, - timeout=None, as_root=as_root) - # print type(results) - self.output['executor'] = results + # Run command and wait for it to complete + results = self.target.execute(self.command, + timeout=None, as_root=as_root) + # print type(results) + self.output['executor'] = results # Wait `end_pause` seconds before stopping ftrace if end_pause_s: