From 1deb3900a1bae6ee506a6eea861dec3ce9def565 Mon Sep 17 00:00:00 2001 From: Serge Rehbinder Date: Wed, 26 Oct 2016 15:31:50 +0200 Subject: [PATCH] sat jobs: add the possibility to add a prefix to the command launched on the remote machine --- commands/jobs.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/commands/jobs.py b/commands/jobs.py index a62f68e..16940ab 100644 --- a/commands/jobs.py +++ b/commands/jobs.py @@ -238,7 +238,7 @@ class Job(object): '''Class to manage one job ''' def __init__(self, name, machine, application, board, - commands, timeout, config, logger, after=None): + commands, timeout, config, logger, after=None, prefix=None): self.name = name self.machine = machine @@ -277,6 +277,8 @@ class Job(object): " job --jobs_config .jobs_command_file" + " --name " + self.name) + if prefix: + self.command = prefix + ' "' + self.command +'"' def get_pids(self): """ Get the pid(s) corresponding to the command that have been launched @@ -656,6 +658,9 @@ class Jobs(object): board = None if 'board' in job_def: board = job_def.board + prefix = None + if "prefix" in job_def: + prefix = job_def.prefix return Job(name, machine, @@ -665,7 +670,8 @@ class Jobs(object): timeout, self.runner.cfg, self.logger, - after = after) + after = after, + prefix = prefix) def determine_jobs_and_machines(self): '''Function that reads the pyconf jobs definition and instantiates all -- 2.39.2