aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucian Musat <george.l.musat@intel.com>2015-09-28 17:25:56 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 15:15:48 +0100
commit2bc7732c27e192821b9ebb76e1dfba739cf5b088 (patch)
treeed8d8b43fdd3926a0d18b9df78a1141f5f82fb05
parent9f25f723828d6709aad581267ccc63d2ade1ff5c (diff)
downloadopenembedded-core-contrib-2bc7732c27e192821b9ebb76e1dfba739cf5b088.tar.gz
oeqa/runexported: Fix a problem with ssh_target_log existing in folder.
When copying the exported tests to a remote machine ssh_target_log can be transformed from softlink to file which will throw an error when trying to run again. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xmeta/lib/oeqa/runexported.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index 4213cab7bc..0daedd057e 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -49,8 +49,8 @@ class FakeTarget(object):
def exportStart(self):
self.sshlog = os.path.join(self.testdir, "ssh_target_log.%s" % self.datetime)
sshloglink = os.path.join(self.testdir, "ssh_target_log")
- if os.path.islink(sshloglink):
- os.unlink(sshloglink)
+ if os.path.exists(sshloglink):
+ os.remove(sshloglink)
os.symlink(self.sshlog, sshloglink)
print("SSH log file: %s" % self.sshlog)
self.connection = SSHControl(self.ip, logfile=self.sshlog)