X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2FTestSsh.py;h=c9d1e25a33cab6d3816f0a1194ab4b291539a531;hb=dbeef18528cfec910b85da5bd7502338ce7c965c;hp=b6ab94813e346d0c5be9f4121133d45d125c01f3;hpb=d6bf4b85d5614301693ca30642ecd484cba11fb2;p=tests.git diff --git a/system/TestSsh.py b/system/TestSsh.py index b6ab948..c9d1e25 100644 --- a/system/TestSsh.py +++ b/system/TestSsh.py @@ -198,14 +198,15 @@ class TestSsh: def copy_home (self, local_file, recursive=False): return self.copy_abs(local_file,os.path.basename(local_file),recursive) - def fetch (self, remote_file, local_file, recursive=False): + def fetch (self, remote_file, local_file, recursive=False, dry_run=False): if self.is_local(): command="cp " if recursive: command += "-r " command += "%s %s"%(remote_file,local_file) else: command="scp " - command += TestSsh.std_options + if not dry_run: + command += TestSsh.std_options if recursive: command += "-r " command += self.key_part() # absolute path - do not preprend buildname @@ -213,6 +214,7 @@ class TestSsh: remote_path=remote_file else: remote_path="%s/%s"%(self.buildname,remote_file) + remote_path=self.fullname(remote_path) command += "%s:%s %s"%(self.hostname_part(),remote_path,local_file) return utils.system(command)