summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/utils/sshcontrol.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index f5d46e03cc..da485ee408 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -147,8 +147,13 @@ class SSHControl(object):
147 return self._internal_run(command, timeout, self.ignore_status) 147 return self._internal_run(command, timeout, self.ignore_status)
148 148
149 def copy_to(self, localpath, remotepath): 149 def copy_to(self, localpath, remotepath):
150 command = self.scp + [localpath, '%s@%s:%s' % (self.user, self.ip, remotepath)] 150 if os.path.islink(localpath):
151 return self._internal_run(command, ignore_status=False) 151 link = os.readlink(localpath)
152 dst_dir, dst_base = os.path.split(remotepath)
153 return self.run("cd %s; ln -s %s %s" % (dst_dir, link, dst_base))
154 else:
155 command = self.scp + [localpath, '%s@%s:%s' % (self.user, self.ip, remotepath)]
156 return self._internal_run(command, ignore_status=False)
152 157
153 def copy_from(self, remotepath, localpath): 158 def copy_from(self, remotepath, localpath):
154 command = self.scp + ['%s@%s:%s' % (self.user, self.ip, remotepath), localpath] 159 command = self.scp + ['%s@%s:%s' % (self.user, self.ip, remotepath), localpath]