X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestSsh.py;h=d50442298af633f892490914a09bde03fba1c82b;hb=a43a4ea41bab658552029e8efc2c594eb623d25b;hp=603b63e679536b02d9273f909fcd0ea78a826245;hpb=3babd9641bc6965509e559c8f7834023d51947fe;p=tests.git diff --git a/system/TestSsh.py b/system/TestSsh.py index 603b63e..d504422 100644 --- a/system/TestSsh.py +++ b/system/TestSsh.py @@ -58,8 +58,11 @@ class TestSsh: ssh_command += "%s %s" %(self.hostname,TestSsh.backslash_shell_specials(command)) return ssh_command - def run(self, command): - return utils.system(self.actual_command(command)) + def run(self, command,background=False): + local_command = self.actual_command(command) + if background: + local_command += " &" + return utils.system(local_command) def clean_dir (self,dirname): if self.is_local(): @@ -87,11 +90,11 @@ class TestSsh: self.mkdir() self.buildname_created=True - def run_in_buildname (self,command): + def run_in_buildname (self,command, background=False): if self.is_local(): return utils.system(command) self.create_buildname_once() - return self.run("cd %s ; %s"%(self.buildname,command)) + return self.run("cd %s ; %s"%(self.buildname,command),background) def copy (self,local_file,recursive=False): if self.is_local():